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.
bashsudo apt-get update sudo apt-get install -y qemu-user-static binfmt-support
Docker will automatically use QEMU to emulate ARM64:
bashdocker pull --platform linux/arm64 <image_name>
Example:
bashdocker pull --platform linux/arm64 nginx:latest
bashdocker run --platform linux/arm64 -it <image_name>
Example:
bashdocker run --platform linux/arm64 -it nginx:latest
If you’re building ARM64 images on x86-64, use Docker’s buildx:
bashdocker buildx create --use docker buildx build --platform linux/arm64 -t <image_name> .
If Docker’s emulation doesn’t work, manually register QEMU:
bashdocker run --privileged --rm tonistiigi/binfmt --install all
exec format error, ensure qemu-user-static is installed and binfmt_misc is configured.bashdocker info | grep -i emulation
Would you like help with a specific image or use case?
Vibe can make mistakes. Check answers. Learn more