#!/bin/bash set -e 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 exec /usr/bin/dockerlaunch $DOCKER_BIN "$@" $DOCKER_OPTS >>/var/log/docker.log 2>&1