Control Docker disk usage without losing needed data
8 steps · about 2 h 21 min · Intermediate
- Map Docker storage layers (doc, Docker Docs, 18 min)
Distinguish image and writable layers before deciding what can be removed.
- Measure daemon disk use (reference, Docker Docs, 12 min)
Use detailed disk accounting to identify the object class driving growth instead of guessing from host totals.
- Understand writable-layer costs (doc, Docker Docs, 20 min)
Learn why container writable layers behave differently from persistent application data and image layers.
- Identify unused persistent volumes (reference, Docker Docs, 24 min)
Understand the narrow unused-volume cleanup scope so data is backed up or retained before any pruning.
- Bound build-cache growth (doc, Docker Docs, 18 min)
Configure policy-based build cache collection rather than periodically deleting all useful cache.
- Preview safe pruning scope (reference, Docker Docs, 15 min)
Understand exactly which stopped containers, networks, images and cache a prune operation can remove.
- Recognize unbounded JSON logging (doc, Docker Docs, 20 min)
Inspect the default logging behavior and its rotation options so container output cannot silently consume the host filesystem.
- Apply local log rotation (doc, Docker Docs, 14 min)
Use the optimized local driver and verify its rotation behavior as a concrete prevention step.