While using an early “Tech Preview” Docker Desktop build for Apple Silicon I quickly ran into a learning curve related to different architectures and deployment. I can build and run images on my M1 Mac just fine now but this was the error I saw when pushing an image built on a Mac with Apple Silicon to an ECS instance on AWS:
standard_init_linux.go:219: exec user process caused: exec format error
Hopefully, this guide will help you start deploying images built from your amazing new machine faster!
Kudos to the Docker team for moving very fast on a build for the M1 chip. You can get the latest “Tech Preview” from their website. Note that they do not recommend using this version in production.
While you can run Docker containers built on your Mac just fine now, you need to make a build you can run somewhere else on a different architecture. Fortunately, Docker has a tool called buildx
that has you covered.
Once installed, the first thing you have to do to start building for other architectures is to enable the experimental features:
#docker