From d01da4c827f2f45b470df7c3dff1bec56b3c8e06 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 12 Jun 2026 18:06:40 +0000 Subject: [PATCH] docker_confirm: accept locally built images when pull fails A locally built tag (test_locally.sh or docker build) is not on a registry, so the pull phase reported hard failures on a machine that was actually fine. Degrade to a warn when the image is present locally; missing images still fail. --- docker/docker_confirm.ps1 | 8 +++++++- docker/docker_confirm.sh | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/docker_confirm.ps1 b/docker/docker_confirm.ps1 index 306f9977e3..d6c6042de6 100644 --- a/docker/docker_confirm.ps1 +++ b/docker/docker_confirm.ps1 @@ -89,7 +89,13 @@ foreach ($img in @($BASE_IMAGE, $IMAGE)) { } else { $log = Join-Path $WORK ("pull_" + ($img -replace "[/:]", "_") + ".log") docker pull $img *> $log - if ($LASTEXITCODE -eq 0) { Ok "pulled $img" } else { Bad "could not pull $img (see $log)" } + if ($LASTEXITCODE -eq 0) { Ok "pulled $img" } + else { + docker image inspect $img *> $null + # Locally built tags are not on a registry; presence is what matters. + if ($LASTEXITCODE -eq 0) { Warn "not pullable but present locally: $img" } + else { Bad "could not pull $img (see $log)" } + } } } Hr diff --git a/docker/docker_confirm.sh b/docker/docker_confirm.sh index ac0babe7c1..8e63067263 100644 --- a/docker/docker_confirm.sh +++ b/docker/docker_confirm.sh @@ -123,6 +123,10 @@ for img in "$BASE_IMAGE" "$IMAGE"; do docker image inspect "$img" >/dev/null 2>&1 && ok "local image present: $img" || bad "SKIP_PULL=1 but image missing locally: $img" elif docker pull "$img" >"$WORK/pull_$(echo "$img" | tr '/:' '__').log" 2>&1; then ok "pulled $img" + elif docker image inspect "$img" >/dev/null 2>&1; then + # Locally built tags (test_locally.sh / docker build) are not on a + # registry; that is fine as long as the image is present. + warn "not pullable but present locally: $img" else bad "could not pull $img (see $WORK/pull_*.log)" fi