Skip to content

enhancement: describe available platforms when an image has no manifest for the requested one - #2231

Open
henchaves wants to merge 2 commits into
apple:mainfrom
henchaves:fix/2229-describe-available-platforms
Open

enhancement: describe available platforms when an image has no manifest for the requested one#2231
henchaves wants to merge 2 commits into
apple:mainfrom
henchaves:fix/2229-describe-available-platforms

Conversation

@henchaves

@henchaves henchaves commented Sep 2, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Solves #2232.

Running an image that only ships linux/amd64 on an Apple silicon Mac fails with Error: platform linux/arm64. The message does not say that the image has no arm64 variant, which variants exist, or that --arch amd64 / --platform linux/amd64 runs it under Rosetta.

Before:

$ container run -d --name mh mailhog/mailhog:v1.0.1@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea
Error: platform linux/arm64

After:

Error: image docker.io/mailhog/mailhog@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea has no linux/arm64 variant (available: linux/amd64). Use --arch amd64 or --platform linux/amd64 to run it with Rosetta.

Out of scope: when the image was never pulled, the message comes from the pull path in Containerization and is not changed here.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

…quested one

`container run` on an image with no manifest for the requested platform
failed with `Error: platform linux/arm64`. The message named neither the
image, the platforms it ships, nor the flags that select one.

ClientImage.manifest(for:) now reports
`image <ref> has no <platform> variant (available: <list>)`, skipping
attestation manifests. The run/create path appends
`Use --arch amd64 or --platform linux/amd64 to run it with Rosetta.` when
an amd64 variant exists, or names the first available variant otherwise.

Fixes apple#2229
@henchaves henchaves changed the title Describe available platforms when an image has no manifest for the requested one fix: describe available platforms when an image has no manifest for the requested one Sep 2, 2026
@henchaves henchaves changed the title fix: describe available platforms when an image has no manifest for the requested one enhancement: describe available platforms when an image has no manifest for the requested one Sep 2, 2026
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.

1 participant