Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: crane: How to pull images of two architectures at the same time,like crane pull alipline:latest alipline.tar.gz --platform linux/amd64,linux/arm64 #1326

Closed
bryant-rh opened this issue Mar 25, 2022 · 5 comments
Labels
question Further information is requested

Comments

@bryant-rh
Copy link

How to pull images of two architectures at the same time,like :
crane pull alipline:latest alipline.tar.gz --platform linux/amd64,linux/arm64

@bryant-rh bryant-rh added the question Further information is requested label Mar 25, 2022
@imjasonh
Copy link
Collaborator

The default output format is only suitable to store one image's worth of layer information. If you specify --format=oci (since #1208) it will fetch all platforms of the image, and you can inspect the results to find only the platforms you want.

This is an incomplete answer, I realize, since it requires more work to explore the produced OCI layout, and isn't as easy as --platform=A,B. We haven't really had any requests for this behavior before. Can you share a bit about what you're trying to achieve?

@bryant-rh
Copy link
Author

thank you very much for your reply, --format=oci is enough for me。
I just want to package the image specifying multiple arch

@bryant-rh
Copy link
Author

The default output format is only suitable to store one image's worth of layer information. If you specify --format=oci (since #1208) it will fetch all platforms of the image, and you can inspect the results to find only the platforms you want.

This is an incomplete answer, I realize, since it requires more work to explore the produced OCI layout, and isn't as easy as --platform=A,B. We haven't really had any requests for this behavior before. Can you share a bit about what you're trying to achieve?

But there is a new problem,How to import oci format image to machine through docker or ctr command。
and I tried to package the exported oci image and copied it to the k3s directory: ”rancher/k3s/agent/images/“, and the following error was prompted:
level=error msg="Error encountered while importing /data/rancher/k3s/agent/images/a.tar.gz: unrecognized image format"

@imjasonh
Copy link
Collaborator

I'm not very familiar with k3s, but I would assume it only supports loading one architecture (at least that's how it sounded in ko-build/ko#665), so maybe this would be resolved by only pulling and loading the one image?

@bryant-rh
Copy link
Author

I'm not very familiar with k3s, but I would assume it only supports loading one architecture (at least that's how it sounded in google/ko#665), so maybe this would be resolved by only pulling and loading the one image?

it‘s great,thank you very much for your reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants