Howto build x86_64 linux image on Apple Silicon machine #39670
-
I need to run native images on x86_64 linux systems and want to build on my local machine but creating a native build with quarkus.native.container-build=true fails on my M3 Mac if I use a x86_64 container and set the arch to "x86-64-v2". The docker run command fails with a Java (Mandrel...) crash. I tried podman and colima -- same results. Creating an ARM binary using an ARM container works as expected. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
Try starting the podman machine like this. |
Beta Was this translation helpful? Give feedback.
-
What's the errors you get ? And where/how do you set the arch? |
Beta Was this translation helpful? Give feedback.
-
OK, I think I got it working using podman 5.0.0 as it already supports multi platform, you have to provide that info as a flag, i.e. use "--platform linux/amd64" on the docker command:
I configured quarkus to use this option (tried both podman & docker), but it complains that it's unknown:
or
But when I copy & paste the quarkus generated command and execute it manually, the flag gets recognized it it seems to work... |
Beta Was this translation helpful? Give feedback.
@sbeigel This could be a syntax problem. Try this:
quarkus/docs/src/main/asciidoc/virtual-threads.adoc
Lines 396 to 408 in 18d873e