apple / apple/container

[Request]: `Image save` command: platform default to current

Open
#712 5 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Swift
Stars
49.9k
Forks
1.8k
Avg merge
1d 20h
Merged PRs (30d)
22

Description

### 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

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.