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