mirror of https://github.com/docker/compose.git
Merge pull request #1815 from aanand/abort-if-daemon-cant-start
Abort tests if daemon fails to start
This commit is contained in:
commit
f7b9daf927
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue