Your Mac M 1 Docker Image Will Not Work On Production: Here’s Why.

Akintola L. F. ADJIBAO
3 min readJun 27, 2022

Here is the reason and how to fix it once and for all!

Photo by JESHOOTS.COM on Unsplash

Context

I’ve been using Ubuntu for a while. As a Linux distribution user using an Intel chip, building a docker image and pushing it to dockerhub for production (through a docker-compose file or on Kubernetes) is not a big deal.

But I got the new Macbook Pro M1 a few weeks ago. I had to install the same dev tools and get working on my projects as usual.

The Problem

Everything worked pretty well on my local till I got to the point where I needed to make my docker image work on Kubernetes.

I first pushed the image build on my M1 to dockerhub. But my deployments were failing to create the pods on Elastic Kubernetes Service (AWS EKS).

What’s Going On Actually

After a few checks, I found out that my docker image was built upon the arm architecture.

M1 chips are ARM-based. As we know, docker builds images based on the underneath architecture on which it is installed. So:

  • If you’re running Docker on an AMD architecture SoC, your images will be built for AMD architectures,
  • If you’re rather running docker…

--

--

Akintola L. F. ADJIBAO

Senior DevOps Engineer (8+years), Speaker, CKA | AWS Certified DevOps Professional | Terraform Certified https://www.upwork.com/freelancers/~01d11b6c65945a1160