fix(setup): kill timed image pulls when supported

This commit is contained in:
Vincent Koc
2026-05-26 16:19:33 +02:00
parent 8685dbd547
commit 35310dce8c
3 changed files with 14 additions and 2 deletions
+5 -1
View File
@@ -37,7 +37,11 @@ run_docker_build() {
run_docker_pull() {
local image="$1"
if command -v timeout >/dev/null 2>&1; then
timeout "$DOCKER_PULL_TIMEOUT" docker pull "$image"
if timeout --kill-after=1s 1s true >/dev/null 2>&1; then
timeout --kill-after=30s "$DOCKER_PULL_TIMEOUT" docker pull "$image"
else
timeout "$DOCKER_PULL_TIMEOUT" docker pull "$image"
fi
return
fi
docker pull "$image"