-
Notifications
You must be signed in to change notification settings - Fork 819
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
skopeo inspect failing on Apple Silicone Mac OS X because of the os
metadata field?
#2531
Comments
Thanks for reaching out. Whether this behavior is a good idea is, now, years later, basically moot; it’s the documented/stable behavior, it’s almost certainly used in various scripts and other automation, and we simply chan’t change it any more. If you want to query properties of the Linux image, us Ultimately, the long-term solution is probably going to be #1283 . |
Thank you so much for the response. Great! In your experience, is it always the case that arm64 images are published with an Sorry if you are having this conversation for the millionth time, I am really new to this project! Thanks. |
The behavior is to specifically look for images that match the current system. As for For the platform-specific fields, the user must know what platform is relevant. |
I am building a cli tool that can use another machine with docker installed to download and export a rootfs tarball archive, to be used on the first machine 🤪. Here is the tool I am working on https://github.com/diraneyya/docker2lxc and it is just for fun! |
Hello,
In order to test skopeo I started with a trivial inspection command:
skopeo inspect docker://docker.io/library/alpine:latest
This seems not to work on my Apple Silicone MacBook Pro with a message indicating it might be an issue with the architecture, which you can see below:
In this case, I knew that this image was available for most architectures (including mine), but still, guided by the error message I went ahead and tried to do the same thing on an AMD64 machine, which worked as shown below:
Using a manual call to the docker registry REST API from my Apple Silicone device, however:
curl https://registry.hub.docker.com/v2/repositories/library/alpine/tags | jq '.results[] | {name: .name, architectures: [.images[].architecture] | unique}'
I get the following:
Looking more into it, I decided to also inspect the
variant
andos
features as well:curl https://registry.hub.docker.com/v2/repositories/library/alpine/tags | jq '.results[] | {name: .name, architectures: [.images[].architecture] | unique, variants: [.images[].variant] | unique, os: [.images[].os] | unique}'
And I got the following:
So my question becomes the following:
... is expecting the "os" field to be "darwin" by the tool a good design choice since this official (and likely most conformant Docker image) does not seem to follow this requirement? and would having the tool fail on such a rudimentary command be a bug? a design issue? etc.
I would recommend that if my understanding of the issue is correct, that an os value of
unknown
be accepted on a Mac OS X machine.The text was updated successfully, but these errors were encountered: