Make sure docker is properly shutdown before startup.

This commit is contained in:
Dawn Chen 2016-02-22 11:40:28 -08:00
parent 8bda033ef1
commit 6c5f07d58e

View File

@ -19,10 +19,16 @@
# which in turn restarts docker.
/etc/init.d/docker stop
# Make sure docker gracefully terminated before start again
while pidof docker > /dev/null; do
echo "waiting clean shutdown"
sleep 10
done
/etc/init.d/docker start
echo "waiting a minute for startup"
sleep 60
echo "waiting 30s for startup"
sleep 30
while true; do
if ! sudo timeout 10 docker version > /dev/null; then