A build farm is a collection of build machines with different operating systems or CPU architectures. Each machine builds an image variant for its platform, allowing a single multi-platform image to be produced accurately and quickly. section 12.3
Emulation can build occasional Arm variants, but it is slow and may not reproduce real CPU behavior perfectly. A build farm instead sends work to native Docker Engines, then publishes the variants and their manifest. section 12.3
A practical Buildx workflow is:
- Create Docker contexts that identify the Docker Engines used by the builders. section 12.4
- Create a Buildx builder with one node for each target platform, such as linux/amd64 and linux/arm64. section 12.4
- Run one build command for all platforms and push the resulting variants and multi-platform manifest. section 12.4
A two-platform Buildx farm
Duplicate the current Docker context, create a builder with amd64 and arm64 nodes, and build the application with `docker buildx build --builder ch12-builder --platform linux/arm64,linux/amd64 -t <docker-id>/ch12-hello-x:2e --push ./hello`. The nodes build their assigned platforms, and Buildx pushes the multi-platform manifest. section 12.4
# create the builder – this adds a node with the current context: docker buildx create --name ch12-builder --platform linux/amd64 # append a second node using the duplicate context: docker buildx create --append --name ch12-builder ` --platform linux/arm64 ch12-context # list your builders: docker buildx ls
Use the builder commands to assign platforms to nodes and inspect the resulting build farm. section 12.4
