enhancement: describe available platforms when an image has no manifest for the requested one - #2231
Open
henchaves wants to merge 2 commits into
Open
enhancement: describe available platforms when an image has no manifest for the requested one#2231henchaves wants to merge 2 commits into
henchaves wants to merge 2 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Motivation and Context
Solves #2232.
Running an image that only ships
linux/amd64on an Apple silicon Mac fails withError: platform linux/arm64. The message does not say that the image has no arm64 variant, which variants exist, or that--arch amd64/--platform linux/amd64runs it under Rosetta.Before:
After:
Out of scope: when the image was never pulled, the message comes from the pull path in Containerization and is not changed here.
Testing