docker-init 457 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -e
  3. if [ -e /var/lib/rancher/conf/docker ]; then
  4. source /var/lib/rancher/conf/docker
  5. fi
  6. while [ ! -e /run/console-done ]; do
  7. sleep 1
  8. done
  9. DOCKER_BIN=$(which docker) || DOCKER_BIN=/usr/bin/docker
  10. for i in /opt/bin /usr/local/bin; do
  11. if [ -x ${i}/docker ]; then
  12. PATH=${i}:$PATH
  13. DOCKER_BIN=${i}/docker
  14. break
  15. fi
  16. done
  17. exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >>/var/log/docker.log 2>&1