3 ms·
I've had the displeasure of working with Macs on which we wrote code that would end up being a docker container. But what is compiled on a Mac is an aarch64 con
by OptionOfT 1y ago
I've had the displeasure of working with Macs on which we wrote code that would end up being a docker container. But what is compiled on a Mac is an aarch64 container. What is compiled on an AMD64 Linux machine is amd64.
This is annoying when the code you write is native or reaches out to native stuff. Then all of the sudden your container that builds perfectly on the Mac doesn't build on Linux anymore. (and vice versa, looking at you gcc on debian).
GitHub just (January) got Linux ARM runners, but they're not available for private customers yet.
And their Mac runners do not come with Docker, and it cannot be installed.
- realitysballs 1y agoMatch dev env to prod env?
- OptionOfT 1y agoNo, as their MDM solution only works on Macs.
- mdaniel 1y agoIn fairness, the opposite way usually ends up being much cheaper: make prod run arm64 I would guess that just `alias docker="docker --platform=linux/amd64"` type thing would go a long way toward evicting those platform mismatches[1]. I would also guess there's a way to switch off the binfmt "helper" in colima such that trying to run arm64 in the VM would immediately puke rather than silently helping you 1: or, of course, don't push production containers from your workstation, but the years have taught me that I'm talking to myself
- OptionOfT 1y agoAll of this is an effort to validate that building works on all environments. > alias docker="docker --platform=linux/amd64" I think that on its own breaks a Rust project which uses openssl with the vendored feature.
- pxc 1y ago> And their Mac runners do not come with Docker, and it cannot be installed. ????? If you have a Docker runner on macOS, you're just running a Linux runner in a VM. So just register a Linux runner in a VM, right?
- OptionOfT 1y agoSorry for the late reply. GitHub Actions' macOS runners do not come with Docker installed, because of licensing issues: https://github.com/actions/runner-images/issues/17 https://github.com/actions/runner-images/issues/17 Then there is the issue that the macOS runners are virtual instances, and pass-through virtualization has not been enabled: https://github.com/douglascamata/setup-docker-macos-action#:~:text=For%20the%20M1,open%20an%20issue. https://github.com/douglascamata/setup-docker-macos-action#:...