Skip to content

The cache · hard · 9 min

A version argument that costs nothing

A release changes the VERSION build argument and nothing else. This Dockerfile rebuilds the world every time. Keep the argument and the label it sets, and make a release rebuild at most one instruction.

The cache gate is measured against one edit: change --build-arg VERSION.

Your Dockerfile

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8

Scorecard

Nothing has been graded. Fix the Dockerfile, then build — the gates, the layers and the ledger appear together.

Everything you do here stays in this browser.Part of liter8.sh