drone/ContainerImageDocker: replaced fixed wait time with ready-check loop
This commit is contained in:
parent
53208cab17
commit
81dd41546d
@ -40,7 +40,6 @@
|
|||||||
MERGE_REGISTRY_JSON: "true"
|
MERGE_REGISTRY_JSON: "true"
|
||||||
DEBUG_STEP: "false"
|
DEBUG_STEP: "false"
|
||||||
PUSH_TAGS: "true"
|
PUSH_TAGS: "true"
|
||||||
DOCKER_WAIT_START_SECONDS: "5"
|
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- &ContainerImageDockerCommands |
|
- &ContainerImageDockerCommands |
|
||||||
@ -190,8 +189,12 @@
|
|||||||
env
|
env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# give docker enough time to start
|
# Wait until Docker daemon is running and has completed initialisation
|
||||||
sleep $DOCKER_WAIT_START_SECONDS
|
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
|
# start build
|
||||||
echo $ALL_ARGS | xargs docker build
|
echo $ALL_ARGS | xargs docker build
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user