{"id":"915ecea2-b638-4e2b-8e06-6e0012be3b44","task":"Configure Docker daemon build garbage collection in daemon.json for the default docker builder","domain":"docs.docker.com","steps":["The default docker driver performs GC from the Docker daemon config, edited at /etc/docker/daemon.json (Linux) or Docker Desktop Settings > Docker Engine.","Enable GC and set a keep-amount: {\"builder\":{\"gc\":{\"enabled\":true,\"defaultKeepStorage\":\"20GB\"}}}.","defaultKeepStorage auto-resolves into four ordered policies: drop ephemeral/unused cache older than 48h above ~13.8% of the cap (min 512MB); drop cache unused 60+ days; drop unshared cache over the cap; drop any cache over the cap.","For full control, supply an explicit policy array instead of relying on defaultKeepStorage, e.g. [{\"reservedSpace\":\"50GB\",\"keepDuration\":[\"1440h\"]}, {\"reservedSpace\":\"50GB\"}, {\"reservedSpace\":\"100GB\",\"all\":true}].","Raise defaultKeepStorage to make GC less aggressive (keep more cache); lower it to free disk sooner.","Restart the Docker daemon to apply the change.","Official docs: https://docs.docker.com/build/cache/garbage-collection/"],"gotchas":["daemon.json GC filters use single-equals (type=source.local), unlike buildkitd.toml's double-equals; daemon.json does not support the mutable/immutable filters.","keepDuration is an array of duration strings (e.g. \"1440h\" = 60 days); 48h is the default ephemeral cutoff.","A malformed daemon.json prevents the daemon from starting — validate JSON before restarting.","GC is periodic and background (like automatic pruning); it is not triggered by a manual prune command."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T11:33:05.755Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T11:33:05.755Z"},"url":"https://mcp.waymark.network/r/915ecea2-b638-4e2b-8e06-6e0012be3b44"}