by chubs · 5y ago · 0 comments
I went and checked the issue when i saw they've made a formal release but it doesn't appear to be resolved. So maybe keep it in mind if anyone has issues trying to use docker now :)
Edit: I see Docker has closed the issue and encouraged people to simply use ARM containers instead. Unfortunately that's not an option for cross-compilation when you're using x86 servers. Something for people to keep in mind when deciding what laptop to buy next, i guess.
You don't actually need to run the same architecture you compile for, you just need a toolchain and environment that matches your target and a compiler for your machine's architecture that knows how to write to your target architecture.
It sounds more complicated than it is, really. How you go about doing this might vary by language, but as Docker for M1 takes off, you'll see more and more guides for doing "hard" things like compiling to x86.
Also, if you find that you're building Docker images on x86 machines and want to build Docker images for Arm as well, have a look at https://docs.docker.com/buildx/working-with-buildx/#build-mu... for example.