Best practice to build flutter docker image on mac non-x86 for use on x86-64 machine
02:09 13 Jan 2026

We have a flutter docker image (base image is debian for build and nginx for deployment)

The resulting container has to run on an x86-64 machine (uname -m is x86_64)

If we build the image on an x86-64 machine the container runs fine on the production machine.

However if it is built on a mac machine (with uname -m as arm64) the resulting docker container simply does not run on the x86-64 machine.

The solutions I see are two

  1. do the build on an x86-64 machine

  2. figure out a way to make the build on arm64 work on the x86_64 machine

This question is about option 2, has anybody tried this and made it work successfully?

flutter docker debian arm64 docker-build