-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Image exporter with non-default platform fails #3891
Comments
Signed-off-by: Michael Yuan <michael@secondstate.io>
Signed-off-by: Michael Yuan <michael@secondstate.io>
@rumpl What's the expected behavior? Should it unpack all architectures? Or maybe moby should set |
I would like the build not to fail. moby now does check if the image is unpacked before running so it setting |
Here's what happens if I force unpack=false in moby $ docker buildx build -t rumpl/test --platform=linux/amd64 --load .
[+] Building 0.2s (5/5) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 60B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 60B 0.0s
=> [1/1] COPY / / 0.0s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => exporting manifest sha256:076fa194ad3ee4b081a235162e77f40a4ed6fc9b2b23cd07c868779d7f95f354 0.0s
=> => exporting config sha256:094c2bc1a92a1600c7a55cc23c3085550d3a9db4220b6442f66d1b2ea22312d1 0.0s
=> => exporting attestation manifest sha256:40c58bc71013e0b29c978bbb5a1b9b8eac035f2127f6626e49234a0c746a06be 0.0s
=> => exporting manifest list sha256:da2ffa0139834461fa0efa258c40e60959a4e3f731ee91e7ccbccfe880ec5c2a 0.0s
=> => naming to docker.io/rumpl/test:latest 0.0s
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
rumpl/test latest da2ffa013983 3 seconds ago 1.13kB
$ sudo ctr -n moby i check
ERRO[0000] unable to check unpack for docker.io/rumpl/test:latest error="no match for platform in manifest sha256:da2ffa0139834461fa0efa258c40e60959a4e3f731ee91e7ccbccfe880ec5c2a: not found"
REF TYPE DIGEST STATUS SIZE UNPACKED
docker.io/rumpl/test:latest application/vnd.oci.image.index.v1+json sha256:da2ffa0139834461fa0efa258c40e60959a4e3f731ee91e7ccbccfe880ec5c2a unavailable (0/?) 0.0 B/? false
ctr: unable to check unpack for docker.io/rumpl/test:latest: no match for platform in manifest sha256:da2ffa0139834461fa0efa258c40e60959a4e3f731ee91e7ccbccfe880ec5c2a: not found Will try and see what is happening here |
So I had a chat with @vvoland to help me sort through what was going on 🎉 I think there are 3 distinct issues:
|
I am using docker 24.0.1 and have enabled the containerd image store feature.
With this Dockerfile
If I try to build it for a platform that is not my current platform the build fails. For example I am on linux/arm64 and if I try to build an amd image I get this:
It looks like the
image
exporter (the default one used when the containerd image store is enabled) is trying to only get the manifest for the current platform when unpacking:buildkit/exporter/containerimage/export.go
Line 372 in 48e0528
The text was updated successfully, but these errors were encountered: