Skip to content

feat(push): add --ignore-missing to skip images not available locally - #14341

Merged
glours merged 2 commits into
docker:mainfrom
glours:push-ignore-missing
Oct 14, 2026
Merged

glours merged 2 commits into
docker:mainfrom
glours:push-ignore-missing

Conversation

@glours

@glours glours commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What I did

Add docker compose push --ignore-missing: images that are not in the local image store are skipped (reported as Skipped) instead of failing the push. Any other error still fails the command.

--ignore-push-failures ignores every error, including authentication and registry ones, which hides real problems when the only expectation is that some services were never built. --ignore-missing covers that case on its own, and --ignore-push-failures is unchanged.

publish and the classic build --push do not set the new option, so they behave as before.

Related issue

Closes #7431

🤖 Generated with Claude Code

glours and others added 2 commits October 14, 2026 15:00
`push --ignore-push-failures` ignores every push error, including
authentication and registry failures, which can hide real problems when
the only expectation is that some services have not been built.

Add `--ignore-missing`, which skips an image that is not in the local
image store and still fails on any other error. It is independent of
`--ignore-push-failures`, whose behavior is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
The dry-run client fakes ImageInspect for some callers, picked by the
name of the calling function, and fakes the push of an image. Nothing
tied --ignore-missing to the real state of the local image store in
dry-run.

Check that a missing image is skipped from what the engine really
holds, that the other images get the faked push, and that nothing is
pushed nor looked up in a registry for the skipped ones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours requested review from a team as code owners October 14, 2026 13:10
@glours
glours requested a review from ndeloof October 14, 2026 13:10

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/compose/push.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ndeloof ndeloof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only NotFound is skipped: any other error from ImageInspect leaves the push to report it, which is what makes this different from --ignore-push-failures. The dry-run test checking that the inspection hits the real engine is a nice touch, and push.go had no test before.

Non-blocking suggestion: when every image is skipped, the command exits 0 without pushing anything and, with --quiet, prints nothing at all. A summary (e.g. "N images skipped") or a warning when nothing was pushed would make that case easier to spot in CI logs.

Drafted with Claude Code; read and validated before posting.

@glours
glours merged commit 3d18829 into docker:main Oct 14, 2026
119 of 122 checks passed
@glours
glours deleted the push-ignore-missing branch October 14, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] deprecate push --ignore-push-failures and implement --skip-missing or --ignore-missing

3 participants