H
HN HRCB stories | rights | sources | trends | system | about
home / tuananh.net / item 47166264
+0.20 BuildKit: Docker's Hidden Gem That Can Build Almost Anything (tuananh.net S:+0.15 )
147 points by jasonpeacock 12 hours ago | 49 comments on HN | Mild positive Editorial · v3.7 ·
Summary Freedom of Expression & Education Access Neutral
A technical blog post explaining Docker's BuildKit tool architecture and capabilities. While the content incidentally demonstrates freedom of expression through public knowledge sharing and provides freely accessible educational material, the article does not deliberately engage with human rights themes or principles. The article's alignment with UDHR provisions is circumstantial rather than intentional.
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.18 — 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: ND — Work & Equal Pay Article 23: No Data — 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.18 — Education 26 Article 27: ND — Cultural Participation Article 27: No Data — Cultural Participation 27 Article 28: ND — Social & International Order Article 28: No Data — Social & International Order 28 Article 29: ND — Duties to Community Article 29: No Data — 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.20 Structural Mean +0.15
Weighted Mean +0.18 Unweighted Mean +0.18
Max +0.18 Article 19 Min +0.18 Article 19
Signal 2 No Data 29
Confidence 4% Volatility 0.00 (Low)
Negative 0 Channels E: 0.6 S: 0.4
SETL +0.10 Editorial-dominant
FW Ratio 60% 6 facts · 4 inferences
Evidence: High: 0 Medium: 2 Low: 0 No Data: 29
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.18 (1 articles) Economic & Social: 0.00 (0 articles) Cultural: 0.18 (1 articles) Order & Duties: 0.00 (0 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.20
Article 19 Freedom of Expression
Medium Framing
Editorial
+0.20
SETL
+0.10

Article demonstrates exercise of freedom to seek, receive, and impart information and ideas through public technical writing without restriction

+0.20
Article 26 Education
Medium Coverage
Editorial
+0.20
SETL
+0.10

Article serves educational function by explaining complex technical concepts (BuildKit architecture) in structured, accessible manner; knowledge sharing promotes learning

ND
Preamble Preamble

No reference to human dignity, equality, or fundamental rights

ND
Article 1 Freedom, Equality, Brotherhood

No engagement with equal dignity or rights

ND
Article 2 Non-Discrimination

No reference to discrimination or protected characteristics

ND
Article 3 Life, Liberty, Security

No reference to life, liberty, or personal security

ND
Article 4 No Slavery

No reference to slavery or servitude

ND
Article 5 No Torture

No reference to torture or cruel treatment

ND
Article 6 Legal Personhood

No reference to legal personality or recognition before law

ND
Article 7 Equality Before Law

No reference to equal protection of the law

ND
Article 8 Right to Remedy

No reference to effective remedy for rights violations

ND
Article 9 No Arbitrary Detention

No reference to arbitrary arrest or detention

ND
Article 10 Fair Hearing

No reference to fair and public hearing

ND
Article 11 Presumption of Innocence

No reference to due process or presumption of innocence

ND
Article 12 Privacy

No reference to privacy or correspondence

ND
Article 13 Freedom of Movement

No reference to freedom of movement

ND
Article 14 Asylum

No reference to asylum or persecution

ND
Article 15 Nationality

No reference to nationality or statelessness

ND
Article 16 Marriage & Family

No reference to marriage, family, or personal relations

ND
Article 17 Property

No reference to property rights

ND
Article 18 Freedom of Thought

No reference to conscience, thought, religion, or belief

ND
Article 20 Assembly & Association

No reference to peaceful assembly or association

ND
Article 21 Political Participation

No reference to political participation or governance

ND
Article 22 Social Security

No reference to social security or economic rights

ND
Article 23 Work & Equal Pay

No reference to right to work or fair labor

ND
Article 24 Rest & Leisure

No reference to rest, leisure, or working hours

ND
Article 25 Standard of Living

No reference to health, food, clothing, or standard of living

ND
Article 27 Cultural Participation

No reference to cultural participation or intellectual property

ND
Article 28 Social & International Order

No reference to social and international order

ND
Article 29 Duties to Community

No reference to duties or limitations of rights

ND
Article 30 No Destruction of Rights

No reference to prohibition of rights misuse

Structural Channel
What the site does
+0.15
Article 19 Freedom of Expression
Medium Framing
Structural
+0.15
Context Modifier
ND
SETL
+0.10

Blog platform enables unrestricted publication and public access without editorial gatekeeping or censorship mechanisms

+0.15
Article 26 Education
Medium Coverage
Structural
+0.15
Context Modifier
ND
SETL
+0.10

Content is freely accessible without registration or payment; structured information architecture supports knowledge transfer; no barriers to access for learners

ND
Preamble Preamble

No structural signals related to dignified interaction or equal access principles

ND
Article 1 Freedom, Equality, Brotherhood

No structural signals related to equality

ND
Article 2 Non-Discrimination

No structural barriers or protections observed

ND
Article 3 Life, Liberty, Security

No structural signals related to security or liberty

ND
Article 4 No Slavery

No labor or servitude structures observed

ND
Article 5 No Torture

No relevant structural elements

ND
Article 6 Legal Personhood

No relevant structural elements

ND
Article 7 Equality Before Law

No relevant structural elements

ND
Article 8 Right to Remedy

No relevant structural elements

ND
Article 9 No Arbitrary Detention

No relevant structural elements

ND
Article 10 Fair Hearing

No relevant structural elements

ND
Article 11 Presumption of Innocence

No relevant structural elements

ND
Article 12 Privacy

Standard blog privacy handling; no intrusive tracking detected

ND
Article 13 Freedom of Movement

No relevant structural elements

ND
Article 14 Asylum

No relevant structural elements

ND
Article 15 Nationality

No relevant structural elements

ND
Article 16 Marriage & Family

No relevant structural elements

ND
Article 17 Property

No relevant structural elements

ND
Article 18 Freedom of Thought

No relevant structural elements

ND
Article 20 Assembly & Association

No relevant structural elements

ND
Article 21 Political Participation

No relevant structural elements

ND
Article 22 Social Security

No relevant structural elements

ND
Article 23 Work & Equal Pay

No relevant structural elements

ND
Article 24 Rest & Leisure

No relevant structural elements

ND
Article 25 Standard of Living

No relevant structural elements

ND
Article 27 Cultural Participation

No relevant structural elements

ND
Article 28 Social & International Order

No relevant structural elements

ND
Article 29 Duties to Community

No relevant structural elements

ND
Article 30 No Destruction of Rights

No relevant structural elements

Supplementary Signals
Epistemic Quality
0.64
Propaganda Flags
0 techniques detected
Solution Orientation
No data
Emotional Tone
No data
Stakeholder Voice
No data
Temporal Framing
No data
Geographic Scope
No data
Complexity
No data
Transparency
No data
Event Timeline 20 events
2026-02-27 00:11 eval_success Evaluated: Mild positive (0.14) - -
2026-02-26 22:36 eval_success Light evaluated: Neutral (0.00) - -
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 - -
2026-02-26 18:37 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:36 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:33 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
2026-02-26 18:32 credit_exhausted Credit balance too low, retrying in 333s - -
2026-02-26 18:31 dlq Dead-lettered after 1 attempts: BuildKit: Docker's Hidden Gem That Can Build Almost Anything - -
About HRCB | By Right | HN Guidelines | HN FAQ | Source | UDHR | RSS
build 1286ad6+p3nv · deployed 2026-02-27 02:22 UTC · evaluated 2026-02-27 01:29:19 UTC