Skip to content

[Request]: Describe the available platforms when an image has no variant for the requested one #2232

Description

@henchaves

Feature or enhancement request details

Reopening #2229 as an enhancement request, following the feedback there.

Description

Running an image that only ships linux/amd64 fails with Error: platform linux/arm64. This message gives no clue if the image hasn't arm64 variant, which platforms it does have, or that --arch amd64 / --platform linux/amd64 makes it run under Rosetta.

For example, when I run

MH='mailhog/mailhog:v1.0.1@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea'
container image pull "$MH"
container run -d --name mh -p 8025:8025 "$MH"

I get the following message: "Error: platform linux/arm64"

But I was expecting something more meaningful like "image docker.io/mailhog/mailhog@sha256:8d76... has no linux/arm64 variant (available: linux/amd64). Use --arch amd64 or --platform linux/amd64 to run it with Rosetta."

Therefore, instead of returning a bare message, it could be enhanced to list the platforms it actually has and mention the flag that works.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions