Modern application deployment spans a wider range of hardware architectures than it did even three years ago.

Developer workstations running Apple Silicon use arm64 processors. Cloud infrastructure increasingly includes arm64 instances such as AWS Graviton and Azure Ampere, which offer significant price-performance advantages over equivalent x86 instances. Edge computing environments, IoT deployments, and on-premises infrastructure may require arm64 container images. When an application container is built on an amd64 development machine using the standard docker build command, the resulting image only runs on amd64 architecture. Deploying it to an arm64 environment either fails or requires architecture emulation with significant performance overhead. It solves this by enabling pipelines that produce container images supporting both amd64 and arm64 architectures in a single build step.

ICANIO’s DevOps and Cloud Engineering practice builds build automation, registry management programs, and multi-architecture Docker deployment frameworks for enterprise clients across the USA, UK, Germany, Australia, and Malaysia. This guide covers the complete the build tool workflow for producing multi-platform container images, understanding the arm64 container architecture shift, and managing the registry publishing for multi-architecture images.

Docker Buildx: What It Is and Why It Matters

Docker Buildx is a Docker CLI plugin that extends the standard docker build command with BuildKit, Docker’s next-generation build engine. The standard docker build command creates images tied to the architecture of the machine running the build. the build tool introduces multi-platform build capability, allowing a single build command to produce images for multiple architectures simultaneously, building for both linux/amd64 and linux/arm64 in one step and pushing a multi-architecture manifest to the registry.

The shift toward multi-architecture Docker deployment is driven by several converging forces. ARM-based cloud instances offer up to 40 percent better price-performance compared to equivalent x86 instances in independent benchmarks, making arm64 container support a cost optimisation opportunity for organisations running large containerised workloads in the cloud. Developer teams with mixed hardware, where some engineers use Apple Silicon Macs and others use Intel machines, benefit from pipelines that produce images working consistently across all development environments without architecture-specific workarounds.

IoT and edge deployments targeting Raspberry Pi, NVIDIA Jetson, or other arm64 devices require arm64 images that the build tool enables without maintaining separate build pipelines.

Multi-Platform Build: Setting Up Docker Buildx

The default docker driver does not support multi-platform builds because it only creates images for the host machine’s architecture. Docker Buildx requires a builder instance using the docker-container driver, which runs BuildKit inside a dedicated container that has QEMU emulation pre-configured for cross-architecture builds. Without switching to the docker-container driver, the platform flag will fail for any architecture different from the build host.

Creating a Docker Buildx Builder Instance

Creating a Docker Buildx builder instance requires three flags.

The name flag assigns an identifier to the builder. The driver flag specifies docker-container, which is the driver that enables multi-platform build support. The bootstrap flag initialises the builder immediately rather than lazily. The use flag makes the new builder the active builder for subsequent commands. After creation, running the build tool ls confirms the builder is active and lists the platforms it supports, which should include linux/amd64, linux/arm64, and additional architectures depending on the QEMU configuration. the build tool uses QEMU emulation under the hood to cross-compile for arm64 on an amd64 build machine, which is why the docker-container driver is required rather than the default driver.

Building and Pushing Multi-Platform Images

The core Docker Buildx build command combines the platform flag specifying the target architectures, the tag flag specifying the registry destination and image tag, and the push flag that sends the built images directly to the the registry rather than loading them to the local image store. The push flag is required for this type of build because the local Docker image store cannot hold a multi-architecture manifest. Specifying both linux/amd64 and linux/arm64 in the platform flag produces a single multi-architecture manifest in the the registry that Docker automatically resolves to the correct architecture when the image is pulled on any supported platform.

The platform flag accepts a comma-separated list of architecture targets including linux/amd64, linux/arm64, linux/arm/v7, linux/386, linux/ppc64le, and linux/s390x. For enterprise applications, linux/amd64 and linux/arm64 cover the vast majority of deployment targets: cloud instances, developer machines, and modern edge devices. The tag format follows standard Docker image naming, pointing to the registry repository where the multi-architecture manifest will be stored. ICANIO configures multi-architecture Docker pipelines for enterprise clients in the USA and Australia using GitHub Actions or Azure Pipelines build steps, with the multi-platform build step producing and pushing to the target the registry automatically on every main branch commit.

Container Registry: Publishing and Verifying Multi-Architecture Images

After this build completes successfully, the container registry holds a multi-architecture manifest that references separate image layers for each platform. Verifying that the the registry contains both architectures confirms that the multi-platform build succeeded correctly. The the build tool imagetools inspect command retrieves the manifest from the the registry and displays the platforms supported by the image, including the architecture and operating system for each layer. A the registry entry for a multi-architecture Docker image shows separate entries for linux/amd64 and linux/arm64 in the manifest, confirming that both platform builds completed and were pushed successfully.

Container registry choice affects how multi-architecture manifests are stored and resolved. Docker Hub, Amazon ECR, Azure the registry, and Google Artifact Registry all support multi-architecture manifests through the OCI image specification. Private the registry solutions including Harbor and JFrog Artifactory also support multi-architecture manifests when configured correctly. For ICANIO clients in Germany and the UK with data residency requirements that prevent the use of public the registry services, private the registry deployments are configured with multi-architecture manifest support as part of the container build infrastructure setup.

Arm64 Container Architecture: Key Considerations

Building multi-platform Docker images requires that base images in the Dockerfile support the target architectures. Most official images on Docker Hub, including node, python, golang, and ubuntu, publish multi-architecture manifests and support both amd64 and arm64 natively. When a Dockerfile uses a base image that only supports amd64, the arm64 container build will fail because there is no compatible base layer for the build tool to build from. Checking the OS/Arch section of a base image on Docker Hub before adding it to a Dockerfile ensures that the multi-platform build will succeed for all target architectures.

Application code that calls native libraries or compiled binaries may require architecture-specific handling in the Dockerfile. If a Dockerfile copies pre-compiled binaries, those binaries must be compiled for each target architecture separately. The build tool supports conditional COPY and RUN instructions based on the TARGETPLATFORM build argument, which the build tool automatically sets during multi-platform builds.

Using the TARGETPLATFORM argument to select the correct binary for each architecture during the this build approach allows a single Dockerfile to handle both amd64 and arm64 container targets cleanly. For ICANIO clients in Malaysia and Australia deploying arm64 image applications to AWS Graviton or Azure Ampere instances, architecture-conditional Dockerfiles managed through the build tool are the standard pattern for handling native library dependencies across architectures.

Multi-Architecture Docker: CI/CD Integration

Integrating this build tool into CI/CD pipelines makes execution automatic and consistent across every code change. A typical multi-architecture Docker CI/CD pipeline for the build tool includes logging into the container registry using stored credentials, setting up the the build tool builder instance with the docker-container driver, executing the this build approach command targeting both linux/amd64 and linux/arm64 with push enabled, and verifying the the registry manifest after the push completes.

GitHub Actions provides native build tool support through the docker/setup-buildx-action and docker/build-push-action actions, which abstract the builder creation and multi-platform build commands into reusable workflow steps. Azure Pipelines achieves the same result through Docker tasks with custom build arguments or inline script steps. GitLab CI/CD supports the build tool through shell executors with the Docker daemon accessible. For enterprise clients in the USA and UK running large engineering teams with multiple repositories each requiring arm64 container support, ICANIO implements shared the build tool CI/CD templates supporting multi-architecture Docker builds that teams can reference rather than configuring this build approach pipelines independently in each repository.

Docker Build vs Docker Buildx: Key Differences

Capabilitydocker buildBuildx
Architecture supportHost architecture onlyMulti-platform build for any QEMU-supported architecture
Multi-architecture manifestNot supportedProduces single manifest covering all platform builds
Container registry pushSeparate step requiredBuild and push in a single Buildx command
Cache managementLocal cache onlyRegistry, local, and inline cache backends supported
Build concurrencySequentialParallel builds across platforms in a single Buildx run
ARM64 supportRequires native arm64 machinearm64 container builds on any amd64 machine via QEMU emulation

Docker Buildx in Enterprise Container Strategies

For enterprises managing containerised applications across heterogeneous infrastructure, this tool is not just a build convenience but a foundational component of a consistent container strategy. Without multi-platform build capability, organisations that adopt arm64 cloud instances for cost optimisation must either maintain separate build pipelines for each architecture or accept running amd64 images on arm64 instances under emulation, incurring a performance penalty that negates much of the cost saving. this build tool eliminates this tradeoff by making multi-architecture support a standard property of the container image rather than an infrastructure-specific accommodation.

The container registry management practices around Buildx in enterprise environments include tagging conventions that make the architecture coverage of each image explicit in the image name or tag, retention policies that manage the storage growth from multi-architecture manifests containing multiple layer sets, and access control configurations that restrict which CI/CD pipelines can push new multi-architecture Docker images to which the image registry repositories. ICANIO implements these the image registry governance standards as part of this program delivery for clients in the UK, Germany, Australia, and Malaysia, ensuring that image management scales operationally as the number of images and architectures grows.

The transition from single-architecture container pipelines to multi-platform build pipelines using Docker Buildx is typically straightforward for applications built on standard language runtimes and official base images.

Applications that depend on native binaries, compiled extensions, or architecture-specific system libraries require additional Dockerfile changes to handle the arm64 container build correctly. For these applications, ICANIO conducts a Dockerfile architecture review before converting the build pipeline to this tool, identifying any architecture-specific dependencies and implementing the TARGETPLATFORM conditional build patterns needed to ensure the arm64 image build produces a functionally correct image. This review step prevents the most common this build tool adoption failure: a cross-arch build that completes successfully but produces an arm64 image image that fails at runtime due to an amd64-only binary included in the container image.

BuildKit and the Infrastructure Behind the Build

Understanding what happens inside a build operation when the docker-container driver is active helps engineers debug failures and optimise build performance. When a builder instance is created with the docker-container driver, Docker launches a dedicated container running the BuildKit daemon. BuildKit is the build engine that replaced the legacy builder in Docker 19.03 and is now the default backend for all new Docker installations. The BuildKit daemon inside the builder container handles all build operations, including cross-architecture compilation via QEMU emulation, concurrent layer building, and advanced cache management.

QEMU emulation is what enables cross-architecture compilation on a single host machine. When a build targets an architecture different from the host, BuildKit invokes QEMU to emulate the target architecture during the build steps that execute commands inside the container. This means that RUN instructions in a Dockerfile are executed under emulation when the target architecture differs from the host. Compilation steps, package installations, and any commands that run inside the container during the build execute in the emulated environment. The overhead of QEMU emulation is measurable for compilation-heavy builds but negligible for builds that primarily copy pre-built artifacts into the container image.

The binfmt_misc kernel mechanism enables transparent QEMU emulation on Linux hosts and is automatically configured by the docker buildx create command when using the docker-container driver. On macOS with Docker Desktop, the emulation infrastructure is handled by the Docker Desktop virtual machine. Enterprise build environments running on Linux CI/CD hosts including GitHub Actions runners and Azure Pipelines agents have binfmt_misc support available, which is why cross-architecture builds work on these platforms without additional configuration beyond creating the builder instance.

BuildKit’s layer caching system is particularly valuable for multi-architecture builds because it can reuse cached layers across architectures when those layers are architecture-independent. Static file layers, configuration layers, and layers created by architecture-independent commands can be cached and reused for both the amd64 and arm64 build paths, reducing total build time for incremental changes. The cache exporter flags available in the build command allow build caches to be stored in the image registry alongside the build output, making cached layers available to subsequent builds on fresh CI/CD runners without needing a persistent local cache volume.

Build secrets management is another capability that the BuildKit backend provides and the legacy docker build command did not support. Secrets passed through the build secret mount type are available to RUN instructions during the build but are not stored in any image layer, preventing credentials from being baked into the container image.

For enterprise applications that require authenticated package installations or private repository access during the build, BuildKit secret mounts provide a secure way to pass credentials without creating a security exposure in the published image. ICANIO implements this as a standard practice in enterprise build pipelines for clients in the USA, UK, Germany, Australia, and Malaysia where private package repositories or authenticated API calls are required during the build phase.

Understanding the BuildKit architecture also clarifies why the push flag rather than the load flag is required for multi-architecture builds. The BuildKit daemon manages a separate internal image store from the Docker host’s local image store. When the load flag is used, BuildKit transfers the built image from its internal store to the Docker host’s local store, which only supports single-architecture images. The push flag bypasses the local store entirely and sends the build output directly from the BuildKit internal store to the image registry, which supports multi-architecture manifests natively. This architectural distinction is the reason multi-architecture builds must use the push flag rather than the load flag for the full multi-architecture output.

Frequently Asked Questions

What is Docker Buildx and how does it differ from docker build?

Docker Buildx is a Docker CLI plugin that uses BuildKit to provide multi-platform build capability, advanced caching, and direct container registry push in a single command. The standard docker build command only creates images for the host machine’s architecture. Docker Buildx builds images for multiple architectures simultaneously, making it the required tool for producing multi-platform container images that work across both amd64 and arm64 container environments.

Why is the docker-container driver required for multi-platform builds?

The default docker driver only supports the host machine’s architecture. The docker-container driver runs BuildKit inside a dedicated container that has QEMU emulation configured, enabling cross-architecture compilation for arm64 container builds on amd64 machines and vice versa. Without switching to the docker-container driver, Docker Buildx cannot perform cross-architecture multi-platform build operations.

How do you verify a multi-arch image in the registry?

Use the docker buildx imagetools inspect command followed by the container registry image reference. This retrieves the multi-architecture manifest and displays each platform entry, showing the architecture and OS for every layer in the manifest. A successful multi-platform build shows both linux/amd64 and linux/arm64 entries in the container registry manifest, confirming both architectures were built and pushed.

Can multi-platform images be loaded locally before a push?

Multi-architecture Docker images cannot be loaded to the local image store because the local store does not support multi-architecture manifests. The push flag must be used to send the multi-platform build to the container registry. For local testing of a single architecture, use the load flag with a single platform specified, which loads only that platform’s image to the local store.

What architectures does Docker Buildx support?

Docker Buildx supports all architectures that BuildKit and QEMU emulation can target. The most commonly used platforms for enterprise multi-platform build pipelines are linux/amd64 and linux/arm64, which cover cloud instances, developer workstations, and modern edge devices. Additional supported platforms include linux/arm/v7 for 32-bit ARM, linux/386, linux/ppc64le, and linux/s390x for specialised infrastructure environments.