-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
buildx multi-platform docker builds fail #44
Comments
What is the expected behaviour? Does this work out of the box with docker for mac? I was able to get it to run successfully by having multiple nodes as per the instruction on https://docs.docker.com/buildx/working-with-buildx/. StepsNote: 1. Create instances for the two architectures.The instance with non-native architecture will run noticeably slower. This is expected as the processor is being emulated by qemu. Create an instance for amd64/x86_64 architecture
Create an instance for arm64/aarch64 architecture
2. Create a buildx context to use the created instances as nodes.Step 1 (if successful) should create
3. Run docker buildx buildEverything should be fine now and running |
I will be closing as this is not really a Colima issue. |
Thanks for taking a look! I gave this a try and it seems to be working well. FWIW it does in fact work with 0 modifications when using Docker Desktop. Using this as a solution is perfectly fine though. |
If that is the case, Docker Desktop handles it internally for better user experience. I will revisit this later. |
I have found a proper solution to this that would require almost no setup from the user :) |
Excellent! I look forward to testing it. FWIW I am having good luck with Colima on my Intel Mac mini and my M1 powered MBA. |
Though this is still a valid approach #44 (comment), multiple instances are no longer required. You can reverse those steps. Kindly update to the latest development version Running images of different architectures should work fine. e.g.
Using # this is assuming default profile,
# otherwise the name would be `colima-<profile>` e.g. `colima-arm`.
docker buildx create --use colima |
Confirmed, this is working perfectly for me and I am able to build and run multi-arch images just like before! Nice work! |
@gayanhewa m1s use |
@gayanhewa @goshlanguage this should no longer happen as cross-architecture is supported (though limited). More complex images like java jvm or mssql-server may not behave correctly but most of the amd64 images will work fine on M1. Nonetheless, it is better and recommended to use the arm64 images instead. |
Definitely not sure if this would go here or in lima but I'm unable to do multi-arch builds using buildx. Here is an example error that I get
I get this same error on both my 2018 i7 Mac mini and my 2020 M1 MBA.
This is my config
The text was updated successfully, but these errors were encountered: