Skip to content

Inspect the pulled platform of the image when verifying it - #926

Open
janhoy wants to merge 1 commit into
apache:mainfrom
janhoy:fix-docker-verify-platform
Open

janhoy wants to merge 1 commit into
apache:mainfrom
janhoy:fix-docker-verify-platform

Conversation

@janhoy

@janhoy janhoy commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

The "Verify the published image" step of the Publish Docker Image workflow failed for v0.10.0-rc1, although the image was published correctly: failed run.

Error: pulled docker.io/apache/solr-operator:v0.10.0-rc1 for linux/arm64, but got an image for /

https://github.com/apache/solr-operator/actions/runs/46848504222/job/143461401500

The runner's Docker uses the containerd image store, where an image tag refers to the whole multi-platform index, and docker image inspect without --platform resolves it to the host's platform. The step verifies linux/amd64 first and then removes it, so after pulling only linux/arm64 the inspect found no amd64 variant and returned an empty platform.

The check now inspects the platform that was pulled, with docker image inspect --platform "${platform}". It still fails if the pull stored the wrong variant.

  • Reproduced locally with Docker 29 and the containerd store: after pulling only the non-native platform of v0.10.0-rc1, a plain inspect returns / and an inspect with --platform returns the right platform.
  • Ran the fixed loop locally against v0.10.0-rc1 for both platforms, and it passes.
  • docker buildx imagetools inspect shows the published v0.10.0-rc1 has linux/amd64 and linux/arm64, both built from 882aa4f.

The workflow runs from the pushed commit, so runs for v0.10.0 will only pick this up if it is also cherry-picked to release-0.10 before the next RC or the release tag.

With the containerd image store, which the runner's Docker uses, an
image tag refers to the whole multi-platform index, and docker image
inspect resolves it to the host's platform. After the native platform
had been verified and removed, the inspect of the other platform found
nothing and returned an empty platform, failing the verification of an
image that was published correctly.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@janhoy
janhoy requested review from HoustonPutman and a lite review from Copilot December 2, 2026 12:53

Copilot AI 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.

🟢 Approval recommended

No active review issues remain, and the workflow now verifies the explicitly requested platform variant during multi-platform image pulls.

No open issues 🎉

What changed in this PR

Updates the publish workflow to verify the exact platform requested during multi-platform image pulls, preventing false failures with Docker’s containerd image store.

Changes:

  • Adds --platform "${platform}" to docker image inspect.
  • Preserves validation that the pulled image matches the requested platform.
File Description
.github/​workflows/​publish-docker-image.yaml Updates Docker image verification to inspect and validate the explicitly pulled platform variant.

Review effort: Lite

This branch has not been deployed

No deployments
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.

2 participants