feat: expose if docker is enabled and wait for docker to be ready (#962)

Resolves #897
Resolves #915
This commit is contained in:
Callum Tait
2021-12-29 01:23:35 +00:00
committed by GitHub
parent c5950d75fa
commit ad48851dc9
8 changed files with 54 additions and 12 deletions

View File

@@ -24,6 +24,13 @@ if [ ! -z "${STARTUP_DELAY_IN_SECONDS}" ]; then
sleep ${STARTUP_DELAY_IN_SECONDS}
fi
if [[ "${DISABLE_WAIT_FOR_DOCKER}" != "true" ]] && [[ "${DOCKER_ENABLED}" == "true" ]]; then
log "Docker enabled runner detected and Docker daemon wait is enabled"
log "Waiting until Docker is avaliable or the timeout is reached"
timeout 120s bash -c 'until docker ps ;do sleep 1; done'
else
log "Docker wait check skipped. Either Docker is disabled or the wait is disabled, continuing with entrypoint"
fi
if [ -z "${GITHUB_URL}" ]; then
log "Working with public GitHub"