6 ms·
I tried using docker for x86 builds for Lambda (which doesn't support ARM), and hit this brick wall, unfortunately: https://github.com/docker/for-mac/issues/512
by chubs 5y ago
I tried using docker for x86 builds for Lambda (which doesn't support ARM), and hit this brick wall, unfortunately:
https://github.com/docker/for-mac/issues/5123 https://github.com/docker/for-mac/issues/5123
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.
- ztjio 5y agoThe issue is closed, because, it's not a docker bug, it's a qemu bug. People should engage the qemu project about it.
- lstamour 5y agoI don't know what language you're using on Lambda that requires x86 compilation, but if you search the web for "cross-compiling" you'll find relevant results. For example, here's someone using Graviton ARM to compile Rust for Lambda x86: https://burgers.io/cross-compile-rust-from-arm-to-x86-64 https://burgers.io/cross-compile-rust-from-arm-to-x86-64 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-multi-platform-images https://docs.docker.com/buildx/working-with-buildx/#build-mu... for example.
- chubs 5y agoThanks for the pointer! I tried cross compiling without docker and hit that exact same problem with the Ring dependency. This blog post seems to have a potential solution, i'll give it a try. I do recall trying a million things however.
- t089 5y agoNot sure if related, but have you tried this: https://twitter.com/johannesweiss/status/1382629777987809282?s=21 https://twitter.com/johannesweiss/status/1382629777987809282... ?