Merge pull request #1815 from aanand/abort-if-daemon-cant-start

Abort tests if daemon fails to start
This commit is contained in:
Aanand Prasad 2015-08-06 15:29:55 +01:00
commit f7b9daf927
1 changed files with 7 additions and 0 deletions

View File

@ -8,9 +8,16 @@ fi
# delete it so that docker can start.
rm -rf /var/run/docker.pid
docker -d $DOCKER_DAEMON_ARGS &>/var/log/docker.log &
docker_pid=$!
>&2 echo "Waiting for Docker to start..."
while ! docker ps &>/dev/null; do
if ! kill -0 "$docker_pid" &>/dev/null; then
>&2 echo "Docker failed to start"
cat /var/log/docker.log
exit 1
fi
sleep 1
done