compose/script/wrapdocker
Aanand Prasad 42e6296b0e Kick everything off from a single container
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-09 17:53:54 +00:00

21 lines
466 B
Bash
Executable File

#!/bin/bash
if [ "$DOCKER_VERSION" == "" ]; then
DOCKER_VERSION="1.5.0"
fi
ln -s "/usr/local/bin/docker-$DOCKER_VERSION" "/usr/local/bin/docker"
# If a pidfile is still around (for example after a container restart),
# delete it so that docker can start.
rm -rf /var/run/docker.pid
docker -d $DOCKER_DAEMON_ARGS &>/var/log/docker.log &
>&2 echo "Waiting for Docker to start..."
while ! docker ps &>/dev/null; do
sleep 1
done
>&2 echo ">" "$@"
exec "$@"