1
0
mirror of https://github.com/rancher/os.git synced 2025-06-28 15:56:58 +00:00
os/images/02-console/docker-init

17 lines
418 B
Plaintext
Raw Normal View History

2016-05-06 17:12:09 +00:00
#!/bin/bash
if [ -e /var/lib/rancher/conf/docker ]; then
source /var/lib/rancher/conf/docker
fi
while [ ! -e /run/console-done ]; do
sleep 1
done
DOCKER_BIN=$(which docker) || DOCKER_BIN=/usr/bin/docker
if [ "$DOCKER_BIN" == "/usr/bin/docker" ] && [ -e /usr/local/bin/docker ]; then
DOCKER_BIN=/usr/local/bin/docker
fi
exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >/var/log/docker.log 2>&1