Skip to content

[Request]: Image save command: platform default to current #712

Description

@0Itsuki0

Feature or enhancement request details

When saving an image pulled from remote sources, if the platform is nil, the save will failed with the notFound error:

For example, running

container image save alpine:latest --output /Users/itsuki/Desktop/untitled\ folder/image.tar

will give

Error: notFound: "Content with digest sha256:eafc1edb577d2e9b458664a15f23ea1c370214193226069eb22921169fc7e43f"

The digest here is not the digest for the image we are trying to save specifically, but the same for any (I think) remote images.

However, specifying the platform to be the current platform, in my case, --platform linux/arm64/v8, the save will success.

Code of Conduct

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

Activity

  1. added theissue type on Oct 3, 2025
  2. changed the title [-][Request]: Image save platform default to current[/-] [+][Request]: `Image save` command: platform default to current[/+] on Oct 3, 2025
  3. added
    good-first-issue
    on Oct 6, 2025
  4. added a commit that references this issue on Oct 6, 2025
    e2bd7d3
  5. karenheckel commented on Nov 6, 2025

    @karenheckel
    Contributor

    @0Itsuki0 and @bismansahni If this issue has not yet been resolved, we would love to work on it. We are students at UT Austin working on issues for our virtualization class. Thank you!

  6. katiewasnothere commented on Nov 9, 2025

    @katiewasnothere
    Contributor

    Hi @karenheckel it looks like @bismansahni has an open PR to make this fix, so I will work with them to close this.

    @0Itsuki0 Can you confirm that the remote image was pulled with the --platform, os, and/or arch options in image pull? I'm guessing what is happening is the remote image is multi platform but only a subset of the platforms have been pulled. When we go to save the image, we try to save all the platforms and fail since those layers are not pulled.

    See comment here for what the digest being used is.

  7. jglogan commented on Nov 13, 2025

    @jglogan
    Contributor

    Trivial repro:

    % container image pull --platform linux/arm64 alpine:latest
    % container image save --output image.tar alpine:latest
    Error: notFound: "Content with digest sha256:85f2b723e106c34644cd5851d7e81ee87da98ac54672b29947c052a45d31dc2f"
    /Users/john/Documents/sandboxes % container image save --platform linux/arm64 --output image.tar alpine:latest
    alpine:latest  

    @bismansahni @adityaramani – It seems we have a couple options here:

    1. Attempt to save the current platform
    2. Save all platforms in the manifest that are present (right now we fail I think because the manifest is for all the platforms the actual content is sparse)

    Will option 1 break if say, pull linux/amd64 and then try to image save without a matching platform?

    We should also look into whether we can improve the error message for this; the current one is very developer-centric. To keep this PR focused I've created #874 for that work and we can do that in a follow-on.

  8. jglogan commented on Nov 13, 2025

    @jglogan
    Contributor

    @karenheckel are there any other issues that you're looking at? Let us know if you have questions about any!

  9. karenheckel commented on Nov 13, 2025

    @karenheckel
    Contributor

    @jglogan Hi, yes, my group is currently working on issues #641, #383, and the other tasks in #507 that haven't been done yet. We'll let you know if we have any questions!

  10. added this to the 2026-02 milestone on Jan 25, 2026
  11. modified the milestones: 2026-02, 2026-03 on Feb 11, 2026
  12. modified the milestones: 2026-04, 2026-05 on Apr 22, 2026
  13. removed this from the 2026-05 milestone on May 19, 2026
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

    good-first-issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions