Build cache has grown without limit
CommonBuildKit keeps cache for every build stage, and its default garbage collection is generous: unused cache can stay for up to 60 days, within a size limit that can be more than a small disk can spare. On a machine that builds several times a day this is usually the single largest consumer, and it is entirely reclaimable.
Confirm
docker system df
The Build Cache row. A large TOTAL with an equally large RECLAIMABLE means this is your answer.
Fix
- Reclaim it with
docker builder prune. Add-ato remove all unused build cache, not just dangling entries. - Set a ceiling so it does not recur, rather than pruning by hand when builds start failing.
docker builder prune -a
# Then cap it, in daemon.json:
# { "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } } }The cap is the actual fix. Pruning is the symptom relief. 20GB is already Docker Desktop's default, so on a small disk choose a lower figure.