1
0
mirror of https://github.com/rancher/os.git synced 2025-06-30 08:41:48 +00:00
os/images/02-console/docker-init

23 lines
456 B
Plaintext
Raw Normal View History

2016-05-06 17:12:09 +00:00
#!/bin/bash
set -e
2016-05-06 17:12:09 +00:00
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
for i in /opt/bin /usr/local/bin; do
if [ -x ${i}/docker ]; then
PATH=${i}:$PATH
DOCKER_BIN=${i}/docker
break
fi
done
2016-05-06 17:12:09 +00:00
exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >/var/log/docker.log 2>&1