


What we have above is a command that can be run directly on an Apple Silicon machine, but that will disregard the ARM-based system architecture, and will instead build for whatever platform you pass in the -platform argument. The command looks like this: docker buildx build -platform linux/amd64 -t my-cool-image. It saves a ton of time and hassle, because you can run the build from the terminal in your M1 machine directly, rather than having to go through the process of spinning up a VM, installing Docker, cloning your repo down, logging in to Docker, and then finally building and pushing your image to your chosen Docker registry. Docker ships with a tool called buildx which allows you to specify the targeted platform in the docker build command. Until the other day, that is – when I discovered this nifty feature of Docker Desktop for Mac. And while this seemed a bit tedious, I have always dealt with the issue by spinning up a Linux (or Intel-based Mac) virtual machine and running the build there. Specifically, I got the error: standard_init_linux.go:219: exec user process caused: exec format errorĪfter a quick Stack Overflow search, I found that it was the result of the image having been built for ARM, rather than AMD. They are fast, fast, fast.īut, I’ve run into the issue more than once of Docker images that were built on my M1 that wouldn’t run when deployed to a remote environment.

And as part of that, these days we generally use Apple Silicon machines, which are – generally speaking – all they are cracked up to be. At MacStadium, we embrace cutting edge Mac technology.
