drone/ContainerImageDocker: replaced fixed wait time with ready-check loop

This commit is contained in:
David Hiendl 2022-12-06 16:04:24 +01:00
parent 53208cab17
commit 81dd41546d

View File

@ -40,7 +40,6 @@
MERGE_REGISTRY_JSON: "true"
DEBUG_STEP: "false"
PUSH_TAGS: "true"
DOCKER_WAIT_START_SECONDS: "5"
commands:
- &ContainerImageDockerCommands |
@ -190,8 +189,12 @@
env
fi
# give docker enough time to start
sleep $DOCKER_WAIT_START_SECONDS
# Wait until Docker daemon is running and has completed initialisation
while (! docker stats --no-stream >/dev/null 2>&1); do
# Docker takes a few seconds to initialize
echo "Waiting for Docker to launch..."
sleep 2
done
# start build
echo $ALL_ARGS | xargs docker build