docker
willautomatically select an image variant which matches your OS and architecture.busybox
image supports amd64
, arm32v5
, arm32v6
,arm32v7
, arm64v8
, i386
, ppc64le
, and s390x
. When running this imageon an x86_64
/ amd64
machine, the x86_64
variant will be pulled and run.binfmt_misc
multi-architecture support,which means you can run containers for different Linux architecturessuch as arm
, mips
, ppc64le
, and even s390x
.arm32v7
or ppc64le
variants of the busybox image.buildx
. You can use the buildx
command on Docker Desktop for Mac and Windows to build multi-arch images, link them together with a manifest file, and push them all to a registry using a single command. With the included emulation, you can transparently build more than just native images. Buildx accomplishes this by adding new builder instances based on BuildKit, and leveraging Docker Desktop’s technology stack to run non-native binaries.docker buildx ls
to list the existing builders. This displays the default builder, which is our old builder.docker buildx create --name mybuilder --use
to create a new builder and switch to it using a single command.username
is a valid Docker username.--platform
flag informs buildx to generate Linux images for AMD 64-bit, Arm 64-bit, and Armv7 architectures.--push
flag generates a multi-arch manifest and pushes all the images to Docker Hub.imagetools
.username/demo:latest
. You can use this image to run a container on Intel laptops, Amazon EC2 A1 instances, Raspberry Pis, and on other architectures. Docker pulls the correct image for the current architecture, so Raspberry Pis run the 32-bit Arm version and EC2 A1 instances run 64-bit Arm. The SHA tags identify a fully qualified image variant. You can also run images targeted for a different architecture on Docker Desktop.uname -m
returns aarch64
and armv7l
as expected, even when running the commands on a native macOS developer machine.