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
- 2
- 3
- 4
- 5
- 6
- 7
- 8
Scorecard
Nothing has been graded. Fix the Dockerfile, then build — the gates, the layers and the ledger appear together.