Wait for docker to finish starting up before terminateing init script

This means dependent services can rely on docker being up.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-07-15 11:29:32 +01:00
parent 37cd71fa0d
commit 498c481700
2 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,5 @@
#!/bin/sh
# now start very soon after docker, let containerd start
sleep 1
printf '\n'
DEV=$(ls /dev | grep '[sxv]da$')
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"

View File

@ -75,6 +75,8 @@ start()
--stdout "${DOCKER_LOGFILE}" \
-- --pidfile=${pidfile} ${DOCKER_OPTS}
ewaitfile 20 ${pidfile} /var/run/docker.sock /var/run/docker/libcontainerd/docker-containerd.sock
eend $? "Failed to start docker"
}