talira

Docker Buildx

Docker CLI plugin for extended build capabilities with BuildKit

open sourceApache-2.0self-hostablefree

Docker Buildx is the Docker CLI plugin that runs builds on BuildKit: docker build and docker buildx build send each build to a BuildKit builder and show its progress. It creates and manages builder instances through drivers (BuildKit inside the Docker daemon, a BuildKit container, BuildKit pods on Kubernetes, a BuildKit daemon you run, or Docker Build Cloud), builds multi-platform images on one or several nodes, exports and imports build cache, writes OCI image tarballs, and runs high-level builds from Bake files and Docker Compose files. It ships with Docker Desktop and as the docker-buildx-plugin package beside Docker Engine, under Apache-2.0.

Ways to install

Problems it solves

  • build one image for both amd64 and arm64 and push it under a single multi-platform tag
  • build multi-arch Docker images for ARM and x86 servers from one Dockerfile
  • share Docker layer cache between CI runs by exporting it to a registry or the GitHub Actions cache
  • build container images inside our Kubernetes cluster instead of on a CI machine
  • point docker build at a remote BuildKit daemon
  • define several image builds with their targets and tags in one file and build them in parallel
  • export a built image as an OCI tarball instead of loading it into Docker
  • use native arm64 and amd64 machines together as one builder for cross-platform images
  • docker build with the default builder can't export cache or produce multi-arch images
  • keep using docker build commands but change where the builds run
  • build every service in a docker-compose file with BuildKit

Features

  • the docker build interface, always building with BuildKit
  • multiple builder instances: docker buildx create, use, ls and rm
  • drivers: docker, docker-container, kubernetes, remote and cloud (Docker Build Cloud)
  • multi-platform images, with multi-node builders for native builds per architecture
  • cache export and import to registries, local directories and CI caches
  • tarball and OCI image outputs
  • Bake: high-level builds from HCL, JSON or Compose files
  • Compose build support
  • in-container drivers for Docker and Kubernetes
  • binary also published as the docker/buildx-bin image for use in Dockerfiles
View 1 more
  • multi-platform builds and tarball exports run on a docker-container, kubernetes, remote or cloud builder; the default docker driver doesn't do them

Limitations

  • Needs Docker Engine 19.03 or newer: older Docker versions are incompatible3

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Docker Buildx does.

  1. Buildah A tool that facilitates building OCI container images
  2. kaniko Build Container Images In Kubernetes
  3. BuildKit concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
  4. Docker Build Cloud Build container images faster on cloud builders with a shared cache, locally and in CI
  5. Depot Software delivery built for machine scale
  6. ko Simple, fast container image builder for Go applications

Compare Docker Buildx with the top 3