Tech News
← Back to articles

BuildKit: Docker's Hidden Gem That Can Build Almost Anything

read original related products more articles

BuildKit: Docker's Hidden Gem That Can Build Almost Anything

Posted on February 25, 2026 • 5 minutes • 858 words

Most people interact with BuildKit every day without realizing it. When you run docker build , BuildKit is the engine behind it. But reducing BuildKit to “the thing that builds Dockerfiles” is like calling LLVM “the thing that compiles C.” It undersells the architecture by an order of magnitude.

BuildKit is a general-purpose, pluggable build framework. It can produce OCI images, yes, but also tarballs, local directories, APK packages, RPMs, or anything else you can describe as a directed acyclic graph of filesystem operations. The Dockerfile is just one frontend. You can write your own.

The architecture

BuildKit’s design is clean and surprisingly understandable once you see the layers. There are three key concepts.

LLB: the intermediate representation

At the heart of BuildKit is LLB (Low-Level Build definition). Think of it as the LLVM IR of build systems. LLB is a binary protocol (protobuf) that describes a DAG of filesystem operations: run a command, copy files, mount a filesystem. It’s content-addressable, which means identical operations produce identical hashes, enabling aggressive caching.

When you write a Dockerfile, the Dockerfile frontend parses it and emits LLB. But nothing in BuildKit requires that the input be a Dockerfile. Any program that can produce valid LLB can drive BuildKit.

Frontends: bring your own syntax

... continue reading