+4
Daily
10,422
stars
1,573
forks
121
watchers
4,756
prs
2,448
issues
333
releases
README
BuildKit
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner.
Key features:
- Automatic garbage collection
- Extendable frontend formats
- Concurrent dependency resolution
- Efficient instruction caching
- Build cache import/export
- Nested build job invocations
- Distributable workers
- Multiple output formats
- Pluggable architecture
- Execution without root privileges
Read the proposal from https://github.com/moby/moby/issues/32925
Introductory blog post https://blog.mobyproject.org/introducing-buildkit-17e056cc5317
Join buildkit channel on Docker Community Slack
[!NOTE]
If you are visiting this repo for the usage of BuildKit-only Dockerfile features
like RUN --mount=type=(bind|cache|tmpfs|secret|ssh), please refer to the
Dockerfile reference.
[!NOTE]
docker build uses Buildx and BuildKit by default since Docker Engine 23.0.
You don't need to read this document unless you want to use the full-featured
standalone version of BuildKit.
- Used by
- Quick start
- Linux Setup
- Windows Setup
- macOS Setup
- Build from source
- Exploring LLB
- Frontends
- Exploring Dockerfiles
- Building a Dockerfile with buildctl
- Building a Dockerfile using external frontend
- Output
- Image/Registry
- Local directory
- Docker tarball
- OCI tarball
- containerd image store
- Cache
- Garbage collection
- Export cache
- Inline (push image and cache together)
- Registry (push image and cache separately)
- Local directory
- GitHub Actions cache (experimental)
- S3 cache (experimental)
- Azure Blob Storage cache (experimental)
- Consistent hashing
- Metadata
- Systemd socket activation
- Expose BuildKit as a TCP service
- Load balancing
- Containerizing BuildKit
- Podman
- Nerdctl
- Kubernetes
- Daemonless
- OpenTelemetry support
- Running BuildKit without root privileges
- Building multi-platform images
- Configuring buildctl
- Color Output Controls
- Number of log lines (for active steps in tty mode)
- Contributing
Used by
BuildKit is used by the following projects:
- Moby & Docker (DOCKER_BUILDKIT=1 docker build)
- img
- OpenFaaS Cloud
- container build interface
- Tekton Pipelines (formerly Knative Build Templates)
- the Sanic build tool
- vab
- Rio
- kim
- PouchContainer
- Docker buildx
- Okteto Cloud
- Earthly earthfiles
- Gitpod
- Dagger
- envd
- Depot
- Namespace
- Unikraft
- DevZero
- dacc
Quick start
:information_source: For Kubernetes deployments, see examples/kubernetes.
BuildKit is composed of the buildkitd daemon and the buildctl client.
While the buildctl client is available for Linux, macOS, and Windows, the buildkitd daemon is only available for Linux and Windows currently.
The latest binaries of BuildKit are available here for Linux, macOS, and Windows.
Linux Setup
The buildkitd daemon requirTop issues
#1512Allow controlling cache mounts storage location63 comments · 2020-05-27#2343Cannot give a local image to FROM when using docker-container60 comments · 2021-09-03#1472Improved debugging support56 comments · 2020-05-02#1673mount=type=cache more in-depth explanation?51 comments · 2020-09-05#1186docker build command outputs general information lines to stderr instead of stdout when buildKit is enabled. 47 comments · 2019-10-02#3812Strange resource busy issue on simple buildx using buildkit37 comments · 2023-04-20#4483Buildkitd logs "failed to kill process in container id <cid>: buildkit-runc did not terminate successfully: container not running" for hours35 comments · 2023-12-13#2279Docker BuildKit caching w/ --cache-from fails (roundly 50% rate), even when using docker-container30 comments · 2021-07-26
Discussions
#7342CVE-2026-1114971 comments · 2026-10-30#7114rootless vs userns from a security point of view2 comments · 2026-09-03#7023`unshare(CLONE_NEWNS)` failed in `Dockerfile RUN`, is this a bug?1 comments · 2026-08-06#6919Intermittent "error writing layer blob: failed to reserve cache" during GHA cache export (gha exporter) — not quota, not permissions1 comments · 2026-07-01#6901Does running zstd compression output not result in a gzip recomputation just because s3 cache only supports gzip?1 comments · 2026-06-25#6840Should `docker build .` fail when Dockerfile is a symlink pointing to `../file`?1 comments · 2026-06-08#6640dark~bed2 comments · 2026-04-01#6564When is buildkit for Windows going to be released?0 comments · 2026-03-10
Latest release
v0.35.0 v0.35.0 2026-11-11buildkit 0.35.0 Welcome to the v0.35.0 release of buildkit! Please try out the release binaries and report any issues at https://github.com/moby/buildkit/issues. Contributors Tõnis Tiigi CrazyMax Sebastiaan van Stijn Zhizhen He Adam Stokes Christian Muertz Dean Chen Geoff Johnson Jan Mohr Joao Otavio Manieri Jonathan A. Sternberg Kamil Monicz Luca Landi MarioJames Paweł Gronowski Pierre Fenoll Tamir Duberstein Tianon Gravi ggjulio okhowang(王沛文) ump45nose Notable Changes - Built-in Dockerfile frontend has been updated to v1.29.