Running an ARM64 Docker container on an x86-64 host requires emulation, as the architectures are incompatible. Here’s how to do it efficiently:
Docker Desktop (macOS/Windows) and newer versions of Docker Engine (Linux) support multi-architecture emulation via binfmt_misc and QEMU.
binfmt_misc
sudo apt-get update sudo apt-get install -y qemu-user-static binfmt-support
Docker will automatically use QEMU to emulate ARM64:
docker pull --platform linux/arm64 <image_name>
Example:
docker pull --platform linux/arm64 nginx:latest
docker run --platform linux/arm64 -it <image_name>
docker run --platform linux/arm64 -it nginx:latest
If you’re building ARM64 images on x86-64, use Docker’s buildx:
buildx
docker buildx create --use docker buildx build --platform linux/arm64 -t <image_name> .
If Docker’s emulation doesn’t work, manually register QEMU:
docker run --privileged --rm tonistiigi/binfmt --install all
exec format error
qemu-user-static
docker info | grep -i emulation
Would you like help with a specific image or use case?
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more