+0.24 BuildKit: Docker's Hidden Gem That Can Build Almost Anything (tuananh.net S:+0.25 )
223 points by jasonpeacock 3 days ago | 75 comments on HN | Mild positive Editorial · v3.7 · 2026-02-28 09:04:43 0
Summary Knowledge Sharing & Technical Education Acknowledges
This technical blog post explains BuildKit's modular architecture and demonstrates practical use cases for creating custom build frontends. While not directly addressing human rights, the content positively engages with freedom of expression through open knowledge-sharing, supports equitable access to technical education via free content, and contributes to the developer community's collective understanding of modern software development practices.
Article Heatmap
Preamble: ND — Preamble Preamble: No Data — Preamble P Article 1: ND — Freedom, Equality, Brotherhood Article 1: No Data — Freedom, Equality, Brotherhood 1 Article 2: ND — Non-Discrimination Article 2: No Data — Non-Discrimination 2 Article 3: ND — Life, Liberty, Security Article 3: No Data — Life, Liberty, Security 3 Article 4: ND — No Slavery Article 4: No Data — No Slavery 4 Article 5: ND — No Torture Article 5: No Data — No Torture 5 Article 6: ND — Legal Personhood Article 6: No Data — Legal Personhood 6 Article 7: ND — Equality Before Law Article 7: No Data — Equality Before Law 7 Article 8: ND — Right to Remedy Article 8: No Data — Right to Remedy 8 Article 9: ND — No Arbitrary Detention Article 9: No Data — No Arbitrary Detention 9 Article 10: ND — Fair Hearing Article 10: No Data — Fair Hearing 10 Article 11: ND — Presumption of Innocence Article 11: No Data — Presumption of Innocence 11 Article 12: ND — Privacy Article 12: No Data — Privacy 12 Article 13: ND — Freedom of Movement Article 13: No Data — Freedom of Movement 13 Article 14: ND — Asylum Article 14: No Data — Asylum 14 Article 15: ND — Nationality Article 15: No Data — Nationality 15 Article 16: ND — Marriage & Family Article 16: No Data — Marriage & Family 16 Article 17: ND — Property Article 17: No Data — Property 17 Article 18: ND — Freedom of Thought Article 18: No Data — Freedom of Thought 18 Article 19: +0.24 — Freedom of Expression 19 Article 20: ND — Assembly & Association Article 20: No Data — Assembly & Association 20 Article 21: ND — Political Participation Article 21: No Data — Political Participation 21 Article 22: ND — Social Security Article 22: No Data — Social Security 22 Article 23: +0.10 — Work & Equal Pay 23 Article 24: ND — Rest & Leisure Article 24: No Data — Rest & Leisure 24 Article 25: ND — Standard of Living Article 25: No Data — Standard of Living 25 Article 26: +0.26 — Education 26 Article 27: +0.36 — Cultural Participation 27 Article 28: ND — Social & International Order Article 28: No Data — Social & International Order 28 Article 29: +0.20 — Duties to Community 29 Article 30: ND — No Destruction of Rights Article 30: No Data — No Destruction of Rights 30
Negative Neutral Positive No Data
Aggregates
Editorial Mean +0.24 Structural Mean +0.25
Weighted Mean +0.25 Unweighted Mean +0.23
Max +0.36 Article 27 Min +0.10 Article 23
Signal 5 No Data 26
Volatility 0.08 (Low)
Negative 0 Channels E: 0.6 S: 0.4
SETL +0.05 Editorial-dominant
FW Ratio 59% 13 facts · 9 inferences
Evidence 7% coverage
3M 2L 26 ND
Theme Radar
Foundation Security Legal Privacy & Movement Personal Expression Economic & Social Cultural Order & Duties Foundation: 0.00 (0 articles) Security: 0.00 (0 articles) Legal: 0.00 (0 articles) Privacy & Movement: 0.00 (0 articles) Personal: 0.00 (0 articles) Expression: 0.24 (1 articles) Economic & Social: 0.10 (1 articles) Cultural: 0.31 (2 articles) Order & Duties: 0.20 (1 articles)
HN Discussion 9 top-level · 12 replies
whalesalad 2026-02-26 15:23 UTC link
Folks, please fix your AI generated ascii artwork that is way out of alignment. This is becoming so prevalent - instant AI tell.
moochmooch 2026-02-26 15:36 UTC link
unfortunately, make is more well written software. I think ultimately Dockerfile was a failed iteration of Makefile. YAML & Dockerfile are poor interfaces for these types of applications.

The code first options are quite good these days, but you can get so far with make & other legacy tooling. Docker feels like a company looking to sell enterprise software first and foremost, not move the industry standard forward

great article tho!

bmitch3020 2026-02-26 15:59 UTC link
I don't use buildkit for artifacts, but I do like to output images to an OCI Layout so that I can finish some local checks and updates before pushing the image to a registry.

But the real hidden power of buildkit is the ability to swap out the Dockerfile parser. If you want to see that in action, look at this Dockerfile (yes, that's yaml) used for one of their hardened images: https://github.com/docker-hardened-images/catalog/blob/main/...

verdverm 2026-02-26 16:42 UTC link
BuildKit also comes with a lot of pain. Dagger (a set of great interfaces to BuildKit in many languages) is working to remove it. Even their BuildKit maintainers think it's a good idea.

BuildKit is very cool tech, but painful to run at volume

Fun gotchya in BuildKit direct versus Dockerfiles, is the map iteration you loaded those ENV vars into consistent? No, that's why your cache keeps getting busted. You can't do this in the linear Dockerfile

zaphirplane 2026-02-26 18:18 UTC link
This is a strange double submission , the one with caps made it !

https://news.ycombinator.com/item?id=47152488

cyberax 2026-02-26 18:28 UTC link
Buildkit...

It sounds great in theory, but it JustDoesn'tWork(tm).

Its caching is plain broken, and the overhead of transmitting the entire build state to the remote computer every time is just busywork for most cases. I switched to Podman+buildah as a result, because it uses the previous dead simple Docker layered build system.

If you don't believe me, try to make caching work on Github with multi-stage images. Just have a base image and a couple of other images produced from it and try to use the GHA cache to minimize the amount of pulled data.

kylegalbraith 2026-02-26 19:13 UTC link
After building Depot [0] for the past three years, I can say I have a ton of scar tissue from running BuildKit to power our remote container builders for thousands of organizations.

It looks and sounds incredibly powerful on paper. But the reality is drastically different. It's a big glob of homegrown thoughts and ideas. Some of them are really slick, like build deduplication. Others are clever and hard to reason about, or in the worst case, terrifying to touch.

We had to fork BuildKit very early in our Depot journey. We've fixed a ton of things in it that we hit for our use case. Some of them we tried to upstream early on, but only for it to die on the vine for one reason or another.

Today, our container builders are our own version of BuildKit, so we maintain 100% compatibility with the ecosystem. But our implementation is greatly simplified. I hope someday we can open-source that implementation to give back and show what is possible with these ideas applied at scale.

[0] https://depot.dev/products/container-builds

Avamander 2026-02-26 21:36 UTC link
Except anything that requires any non-trivial networking or hermetic building.
matheus-rr 2026-02-26 22:21 UTC link
The --mount=type=cache for package managers is genuinely transformative once you figure it out. Before that, every pip install or apt-get in a Dockerfile was either slow (no caching) or fragile (COPY requirements.txt early and pray the layer cache holds).

What nobody tells you is that the cache mount is local to the builder daemon. If you're running builds on ephemeral CI instances, those caches are gone every build and you're back to square one. The registry cache backend exists to solve this but it adds enough complexity that most teams give up and just eat the slow builds.

The other underrated BuildKit feature is the ssh mount. Being able to forward your SSH agent into a build step without baking keys into layers is the kind of thing that should have been in Docker from day one. The number of production images I've seen with SSH keys accidentally left in intermediate layers is genuinely concerning.

craftkiller 2026-02-26 15:37 UTC link
Are you on a phone? I loaded the article with both my phone and laptop. The ascii diagram was thoroughly distorted on my phone but it looked fine on my laptop.
craftkiller 2026-02-26 15:41 UTC link
Along similar lines, when I was reading the article I was thinking "this just sounds like a slightly worse version of nix". Nix has the whole content addressed build DAG with caching, the intermediate language, and the ability to produce arbitrary outputs, but it is functional (100% of the inputs must be accounted for in the hashes/lockfile, as opposed to Docker where you can run commands like `apk add firefox` which is pulling data from outside sources that can change from day to day, so two docker builds can end up with the same hash but different output, making it _not_ reproducible like the article falsely claims).

Edit: The claim about the hash being the same is incorrect, but an identical Dockerfile can produce different outputs on different machines/days whereas nix will always produce the same output for a given input.

kccqzy 2026-02-26 15:43 UTC link
Make is timestamp based. That is a thoroughly out-of-date approach only suitable for a single computer. You want distributed hash-based caching in the modern world.
unshavedyak 2026-02-26 16:01 UTC link
I imagine it's not the AI then, but the site font/css/something. Seeing as it looks fine for me (Brave, Linux).
tuananh 2026-02-26 16:03 UTC link
i did include a repo example on how to create custom frontend as well https://github.com/tuananh/apkbuild
seneca 2026-02-26 16:41 UTC link
I found it more jarring that they chose to use both Excalidraw and ascii art. What a strange choice.
scuff3d 2026-02-26 17:18 UTC link
The "This is the key insight -" or "x is where it gets practical -", are dead give aways too. If I wanted an LLMs explanation of how it works, I can ask an LLM. When I see articles like this I'm expecting an actual human expert
stackskipton 2026-02-26 17:39 UTC link
SRE here, I feel like both are just instructions how to get source code -> executable with docker/containers providing "deployable package" even if language does not compile into self-contained binary (Python, Ruby, JS, Java, .Net)

Also, there is nothing stopping you from creating a container that has make + tools required to compile your source code, writing a dockerfile that uses those tools to produce the output and leave it on the file system. Why that approach? Less friction for compiling since I find most make users have more pet build servers then cattle or making modifications can have a lot of friction due to conflicts.

mid-kid 2026-02-26 18:58 UTC link
How do you use buildah? with dockerfiles?

I find that buildah is sort of unbearably slow when using dockerfiles...

kodama-lens 2026-02-26 19:23 UTC link
I switched our entire container build setup to buildkit. No kaniko, no buildah, no dind. The great part is that you can split buildkitd and the buildctl.

Everything runs in its own docker runner. New buildkitd service for every job. Caching only via buildkit native cache export. Output format oci image compressed with zstd. Works pretty great so far, same or faster builds and we now create multi arch images. All on rootless runners by the way

hanikesn 2026-02-26 19:43 UTC link
Why would you use the horrible GHA cache and not a much more efficient registry based cache?
skrtskrt 2026-02-26 21:05 UTC link
> It's a big glob of homegrown thoughts and ideas. Some of them are really slick, like build deduplication. Others are clever and hard to reason about, or in the worst case, terrifying to touch.

This is true of packaging and build systems in general. They are often the passion projects of one or a handful of people in an organization - by the time they have active outside development, those idiosyncratic concepts are already ossified.

It's really rare to see these sorts of projects decomposed into building blocks even just having code organization that helps a newcomer understand. Despite all the code being out in public, all the important reasoning about why certain things are the way they are is trapped inside a few dev's heads.

Editorial Channel
What the content says
+0.40
Article 27 Cultural Participation
Medium Coverage Practice
Editorial
+0.40
SETL
+0.20

Post contributes detailed technical knowledge to developer and open-source communities, enabling broader participation in software development practices and advancing shared understanding of modern build systems.

+0.30
Article 26 Education
Medium Coverage Practice
Editorial
+0.30
SETL
+0.17

Post provides detailed, structured educational content explaining BuildKit architecture with concrete examples, facilitating understanding of complex technical concepts and enabling self-directed learning.

+0.20
Article 19 Freedom of Expression
Medium Advocacy
Editorial
+0.20
SETL
-0.17

Post openly expresses technical opinions and analysis about BuildKit architecture without restriction, demonstrating exercise of freedom of expression through technical discourse.

+0.20
Article 29 Duties to Community
Low Practice
Editorial
+0.20
SETL
0.00

Post demonstrates fulfillment of duties to community through sharing technical knowledge and expertise gained through experience, contributing to collective development capacity.

+0.10
Article 23 Work & Equal Pay
Low Framing
Editorial
+0.10
SETL
ND

Post discusses BuildKit as tool that improves developer efficiency through parallelization and automation, potentially facilitating better working conditions by reducing manual labor.

ND
Preamble Preamble

Preamble addresses human dignity, equality, and justice. Technical post does not engage with these foundational principles.

ND
Article 1 Freedom, Equality, Brotherhood

Addresses equal rights and dignity. Technical post does not discuss these topics.

ND
Article 2 Non-Discrimination

Addresses non-discrimination. Technical post does not discuss equality or discrimination.

ND
Article 3 Life, Liberty, Security

Addresses right to life, liberty, and security. Not discussed in technical post.

ND
Article 4 No Slavery

Addresses freedom from slavery. Not discussed in technical post.

ND
Article 5 No Torture

Addresses freedom from torture or cruel treatment. Not discussed in technical post.

ND
Article 6 Legal Personhood

Addresses recognition as person before the law. Not discussed in technical post.

ND
Article 7 Equality Before Law

Addresses equal protection of law. Not discussed in technical post.

ND
Article 8 Right to Remedy

Addresses right to effective remedy. Not discussed in technical post.

ND
Article 9 No Arbitrary Detention

Addresses freedom from arbitrary arrest. Not discussed in technical post.

ND
Article 10 Fair Hearing

Addresses right to fair and public hearing. Not discussed in technical post.

ND
Article 11 Presumption of Innocence

Addresses presumption of innocence. Not discussed in technical post.

ND
Article 12 Privacy

Addresses privacy and family life. Not discussed in technical post.

ND
Article 13 Freedom of Movement

Addresses freedom of movement. Not discussed in technical post.

ND
Article 14 Asylum

Addresses right to seek asylum. Not discussed in technical post.

ND
Article 15 Nationality

Addresses right to nationality. Not discussed in technical post.

ND
Article 16 Marriage & Family

Addresses marriage and family rights. Not discussed in technical post.

ND
Article 17 Property

Addresses right to property. Not discussed in technical post.

ND
Article 18 Freedom of Thought

Addresses freedom of thought, conscience, and religion. Not discussed in technical post.

ND
Article 20 Assembly & Association

Addresses freedom of peaceful assembly and association. Not discussed in technical post.

ND
Article 21 Political Participation

Addresses right to participate in government. Not discussed in technical post.

ND
Article 22 Social Security

Addresses right to social security. Not discussed in technical post.

ND
Article 24 Rest & Leisure

Addresses right to rest, leisure, and reasonable working hours. Not discussed in technical post.

ND
Article 25 Standard of Living

Addresses right to adequate standard of living. Not discussed in technical post.

ND
Article 28 Social & International Order

Addresses right to just and favorable international order. Not discussed in technical post.

ND
Article 30 No Destruction of Rights

Addresses principle that nothing in UDHR can be interpreted as destroying any rights. Not discussed in technical post.

Structural Channel
What the site does
+0.30
Article 19 Freedom of Expression
Medium Advocacy
Structural
+0.30
Context Modifier
ND
SETL
-0.17

Content published on unrestricted public blog with no access controls or registration barriers, enabling readers to freely access expressed ideas.

+0.30
Article 27 Cultural Participation
Medium Coverage Practice
Structural
+0.30
Context Modifier
ND
SETL
+0.20

Freely shared technical knowledge and code patterns can be adopted and adapted by community, facilitating collective participation in scientific and cultural advancement.

+0.20
Article 26 Education
Medium Coverage Practice
Structural
+0.20
Context Modifier
ND
SETL
+0.17

Content freely accessible without paywall or registration, supporting equitable access to technical education and independent learning.

+0.20
Article 29 Duties to Community
Low Practice
Structural
+0.20
Context Modifier
ND
SETL
0.00

Concrete code examples and patterns made available for community use, enabling others to benefit from shared expertise.

ND
Preamble Preamble

No structural implications.

ND
Article 1 Freedom, Equality, Brotherhood

No structural implications.

ND
Article 2 Non-Discrimination

No structural implications.

ND
Article 3 Life, Liberty, Security

No structural implications.

ND
Article 4 No Slavery

No structural implications.

ND
Article 5 No Torture

No structural implications.

ND
Article 6 Legal Personhood

No structural implications.

ND
Article 7 Equality Before Law

No structural implications.

ND
Article 8 Right to Remedy

No structural implications.

ND
Article 9 No Arbitrary Detention

No structural implications.

ND
Article 10 Fair Hearing

No structural implications.

ND
Article 11 Presumption of Innocence

No structural implications.

ND
Article 12 Privacy

No structural implications.

ND
Article 13 Freedom of Movement

No structural implications.

ND
Article 14 Asylum

No structural implications.

ND
Article 15 Nationality

No structural implications.

ND
Article 16 Marriage & Family

No structural implications.

ND
Article 17 Property

No structural implications.

ND
Article 18 Freedom of Thought

No structural implications.

ND
Article 20 Assembly & Association

No structural implications.

ND
Article 21 Political Participation

No structural implications.

ND
Article 22 Social Security

No structural implications.

ND
Article 23 Work & Equal Pay
Low Framing

No structural implications observed.

ND
Article 24 Rest & Leisure

No structural implications.

ND
Article 25 Standard of Living

No structural implications.

ND
Article 28 Social & International Order

No structural implications.

ND
Article 30 No Destruction of Rights

No structural implications.

Supplementary Signals
How this content communicates, beyond directional lean. Learn more
Epistemic Quality
How well-sourced and evidence-based is this content?
0.75 medium claims
Sources
0.7
Evidence
0.8
Uncertainty
0.7
Purpose
1.0
Propaganda Flags
No manipulative rhetoric detected
0 techniques detected
Emotional Tone
Emotional character: positive/negative, intensity, authority
measured
Valence
+0.5
Arousal
0.4
Dominance
0.6
Transparency
Does the content identify its author and disclose interests?
1.00
✓ Author
More signals: context, framing & audience
Solution Orientation
Does this content offer solutions or only describe problems?
0.88 solution oriented
Reader Agency
0.8
Stakeholder Voice
Whose perspectives are represented in this content?
0.20 1 perspective
Speaks: individuals
About: corporation
Temporal Framing
Is this content looking backward, at the present, or forward?
present immediate
Geographic Scope
What geographic area does this content cover?
global
Complexity
How accessible is this content to a general audience?
technical high jargon domain specific
Longitudinal 1649 HN snapshots · 6 evals
+1 0 −1 HN
Audit Trail 26 entries
2026-02-28 13:29 eval_success Lite evaluated: Neutral (0.00) - -
2026-02-28 13:29 eval Evaluated by llama-4-scout-wai: 0.00 (Neutral) 0.00
reasoning
ED, neutral tech tutorial
2026-02-28 13:26 eval_success Lite evaluated: Neutral (0.00) - -
2026-02-28 13:26 eval Evaluated by llama-3.3-70b-wai: 0.00 (Neutral) 0.00
reasoning
Tech tutorial no rights stance
2026-02-28 09:04 eval Evaluated by claude-haiku-4-5-20251001: +0.25 (Mild positive)
2026-02-28 01:34 dlq_replay DLQ message 97523 replayed to EVAL_QUEUE: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-28 00:42 eval_success Light evaluated: Neutral (0.00) - -
2026-02-28 00:42 eval Evaluated by llama-3.3-70b-wai: 0.00 (Neutral)
reasoning
Tech tutorial no rights stance
2026-02-28 00:42 rater_validation_warn Light validation warnings for model llama-3.3-70b-wai: 0W 7R - -
2026-02-27 00:11 eval_success Evaluated: Mild positive (0.14) - -
2026-02-27 00:11 eval Evaluated by deepseek-v3.2: +0.14 (Mild positive) 11,376 tokens
2026-02-26 22:36 eval_success Light evaluated: Neutral (0.00) - -
2026-02-26 22:36 eval Evaluated by llama-4-scout-wai: 0.00 (Neutral)
reasoning
ED, neutral tech tutorial
2026-02-26 22:15 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 22:13 rate_limit OpenRouter rate limited (429) model=llama-3.3-70b - -
2026-02-26 22:12 rate_limit OpenRouter rate limited (429) model=llama-3.3-70b - -
2026-02-26 22:11 rate_limit OpenRouter rate limited (429) model=llama-3.3-70b - -
2026-02-26 18:41 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:41 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:40 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:40 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:40 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:39 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:38 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:38 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:37 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -