jargon

Comparison

Build cachevsImage layer

Build cache

the build was instant on your laptop and takes six minutes on the runner, because the runner starts empty every time.

The store of previously built layers a build reuses instead of re-running the step. Locally it is free and invisible; in CI it is a thing you have to deliberately mount, export or pull, and the single largest cause of slow pipelines is that nobody did. A cache hit depends on the exact command and the checksum of what it copies, so a build that touches a timestamp or a lockfile on every run has no cache at all.

Full entry →

Image layer

changing one line at the top of the build file invalidates every layer beneath it and the build goes from nine seconds to four minutes.

One filesystem diff produced by a single build step, content-addressed and stacked with the others to form the image. Layers are shared and cached across images, which is what makes pulling a new build of the same service cheap. The whole practical skill of writing a build file is ordering steps so the slow, rarely-changing ones sit underneath the fast, always-changing ones.

Full entry →

Related comparisons