Skip to content

binfmt

Not Our Image

This image is not built (or modified or maintained) by, nor has any direct affiliation with us. But like many other FOSS, we like and trust it enough and may (or may not) use it ourselves. Any issues/questions/support regarding this image that is not relevant to this documentation or snippets go to the actual owner or maintainers.

updated stars forks watchers issues issues-pr
pulls stars

Cross-platform emulator collection distributed with Docker images.


This is the official image of binfmt containing qemu-user binaries to emulate binary compatibilty of multiple architectures on the same host machine. Versioned accordingly with releases from /tonistiigi/binfmt.


Get the Image

Pull the image from Docker Hub.

docker pull tonistiigi/binfmt

Run

We can install or uninstall support for a specific architecture like

docker run --rm --privileged tonistiigi/binfmt --install <arch>
docker run --rm --privileged tonistiigi/binfmt --uninstall <arch|qemu-*>

Supported Architectures

Argument Architecture Image Platform
amd64 x86_64 linux/amd64
arm64 aarch64 linux/arm64
arm armv6 linux/arm/v6
arm armv7 linux/arm/v7
386 i386 linux/386
loong64 loongarch64 linux/loong64
mips64 mips64 linux/mips64
mips64le mips64le linux/mips64le
ppc64le ppc64le linux/ppc64le
riscv64 riscv64 linux/riscv64
s390x s390x linux/s390x

For multiple architectures, pass them in a comma-separated list e.g arm64,arm,amd64.


As-A-Service

Run the container as a service with the following as reference (and modify it as needed).

With docker-compose (binfmt.yml)

---
services:
  binfmt:
    container_name: binfmt
    command: --install ${BINFMT_ARCHS:-all}
    deploy:
      resources:
        limits:
          cpus: '1.00'
          memory: 256M
      restart_policy:
        condition: none
    hostname: binfmt
    image: tonistiigi/binfmt:${BINFMT_TAG:-latest}
    network_mode: bridge
    privileged: true

That's all folks! Happy containerizing!