Build1 publisher3 min readPublished
Every Cloud Build run gets a fresh VM with an empty Docker daemon, so the only layer cache that survives a build is one exported to a registry. The documented paths reach for a published image or an archived tool instead.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
The tell is in what a published image actually contains. `--cache-from <previous image>` offers the layers of that image as cache candidates [5]. A final image carries the layers of its final stage. Whatever the builder stage did was thrown away when the build moved on, so nothing pointing at the published tag can bring it back, which is why the write-up's author calls the miss silent [6]. The flag is accepted and the build succeeds; the expensive layer gets rebuilt anyway.
The author identifies BuildKit's registry cache with `mode=max` as the mode that actually persists that dependency layer, and says neither documented path mentions it [8]. The store is already in the project: Artifact Registry, shared by every build [4].
That only pays if the Dockerfile is ordered for it. A layer survives when both its instruction and its input context are unchanged, and invalidating one layer invalidates every layer beneath it [11]. So the lockfile copy and the install go above the source copy [12]; with `pyproject.toml` and `uv.lock` untouched, uv re-downloads nothing [14].
Now the number. The 30 to 60 seconds is attributed to a Python app with a few dozen packages [9], while the demo in the article is FastAPI plus uvicorn with a 21-package transitive tree [13], and the published text carries no before-and-after timing [19]. For that figure to transfer, dependency resolution has to dominate your build, the layer order has to put the lockfile above the source, and pulling the cache manifest and blobs out of Artifact Registry has to cost less than re-resolving them. `mode=max` stores more layers than a final-image cache, so there is more to pull and more to keep, and the write-up prices neither [19].
Take the top of the range and a pipeline firing ten times a working day: 60 s x 10 x 250 = 150,000 s, about 42 hours of worker time a year, with the bottom of the range landing near 21 hours [18]. Per pipeline. That is the size of the prize and also its ceiling.
The documentation is the part I would escalate. Google archived Kaniko on June 3, 2025, with a notice that the project is no longer developed or maintained [7], and the author reports the official guidance still offers it as one of two cache options [5]. That leaves `--cache-from` as the live documented route, which is the one that skips the builder stage [6]. Guidance pointing at an archived project is still guidance; the build just does not get faster. The author also notes that almost nobody in his circle, including the Google Developer Expert community, persists the Docker cache on Cloud Build at all [16], which is what you would expect when the default makes caching look broken [2].
In my context the trade is easy: a Python image where dependency install dominates, a registry in the same project, a lockfile that moves weekly. If the slow part of your image is a compile step that changes with every commit, the registry cache buys you the pull and little else.
Ranked by verification strength, evidence, and original report placement.
Cloud Build runs on ephemeral workers: every build starts on a fresh VM with no state from previous builds, and the VM's Docker daemon is empty.
A bare docker build on Cloud Build will never cache anything between runs, and the default behaviour makes it feel as though Docker caching just does not work there.
The author frames the lack of persistence as the model rather than a bug: isolation and reproducibility.
The stated solution is to externalise the cache into a registry that every build shares, and the article notes that registry already exists in the project as Artifact Registry, giving a persistent cache.
The author states that --cache-from with a previous image silently misses multi-stage builder layers.
The author says that once you understand why the default fails, the fix is three lines.
Follow any of these and your For You feed starts watching them — no settings page required.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Mechanism checkable, savings self-reported
Split the piece in two and the halves score differently. Everything about why the default fails follows from how Cloud Build provisions builds and how Docker invalidates layers, and the Kaniko archival comes with a date and a quoted notice a reader can go and see. The number in the headline rests on the author's recollection from client work; no build log, timing table or named pipeline backs it.
One practitioner's circle
The only hard uptake signal points away from the story's subject: Google retiring Kaniko. For the technique itself there is an anecdote about the author's own circle not using it and a demo repository he published himself. Nothing shows a team switching, and Google has not moved the documentation.
Headline number outruns the log
The diagnosis is stated at roughly the strength the mechanism supports, and the criticism of Google's guidance is specific enough to check. The sell is in the payoff: three lines and the waste goes away, with no measured build times, no price for keeping a mode=max cache in Artifact Registry, and no acknowledgement that pulling a large cache back costs seconds of its own.
Disclosed, and aimed at Google
The author writes as a platform engineer and Google Developer Expert, publishing in dev.to's GDE space, so the standing he gains by correcting Google's own guidance is visible on the byline rather than buried. Working the other way: the post funnels readers to his GitHub repo and to a second instalment on Docker Bake, and a problem that looks like a documentation blind spot sustains a series better than a config flag does.
Firm on the why, thin on the how much
We would defend the causal story and the documentation criticism to a sceptical reader today. The quantities are another matter: one publisher, one author, one demo app, and a headline range nobody outside the piece has reproduced.
build
Before you spend quota on an agent skill, make it pass an eval harness1 publisher
build
Your CI Build Is Slow Because The Cache Is Empty, Not Because The Base Image Is Fat1 publisher
build
Force the tool call, then hand Lightsail a long-lived key1 publisher
security
Google's reference agent approved a $10,000 refund on a $149 order, on purpose1 publisher
Publishers with included, body-backed reporting in this cluster.
1 article · September 7, 2026