-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Building from a multi-arch image unpacks wrong architecture image #182
Comments
Would you be able to provide the Dockerfile you're trying to build and logs of the error? We have an integration test which pulls alpine:3.7 and is passing, so the error might be coming from some command in the Dockerfile which isn't being handled correctly. |
Hey @priyawadhwa, sure! I'm running kaniko in my own container, but I think that's not important, because I can reproduce the error. I can build this Dockerfile on a RPi Kubernetes node:
But not this one:
I get this error:
The Dockerfile I used for building my test
|
Hey @jesusofsuburbia -- I was able to build an image with both |
I'm going to go ahead and close this issue, please open another if you have any more questions! |
I have the same problem with a ARM64 kubernetes cluster using CRI-O runtime and a multi-stage dockerfile for building, build is controlled by kaniko. I use a custom image for the first stage, then switch to nginx and get an exec format error.
The nginx:alpine image on dockerhub is a multiarch manifest, arm64 beeing available. |
I suspect this is might be caused by #535 - when specifying the exact image (without :latest or any other tag!), the build works:
But this is obviously not the desired behaviour for multi-arch images. |
@everflux I added a You could use that here and passing in a It's unclear to me if that should always happen or be based on some flag. |
I ran into this as well, and have opened #646 in the kaniko project. This, however, is more widespread than just kaniko. For example, https://github.com/google/ko also ends up calling image.Remote. Any project that doesn't use the |
At least for |
Hi again,
another issue that I noticed while testing with kaniko and gitlab:
When building a project and the Dockerfile build
FROM
a multi-arch image,the image that is pulled and unpacked is not matching the system architecture.
Tested with an
arm
device:When I have
FROM alpine:3.7
(which is multi-arch and supports arm) in my dockerfile, it fails (exec format error)Using
FROM arm32v6/alpine:3.7
instead works.(btw: Kaniko itself runs perfectly on arm!)
This would be a nice feature!
It would also make sense to annotate the manifest correctly when pushing.
super cool stuff, thank you!
The text was updated successfully, but these errors were encountered: