Disk shows 95% full on `/var/lib/docker`. What do you check in order?
IntermediateScenarioVolumes, storage and data
Answer
Situation read → Typically images, build cache, container logs or volumes.
What I'd do →
docker system df -v
du -xh --max-depth=2 /var/lib/docker | sort -h | tail
ls -lhS /var/lib/docker/containers/*/*-json.log | head
Then prune images/build cache, truncate offending logs (truncate -s 0 <file>), and set max-size/max-file log options.
Why → The json-file driver has no rotation by default.
Interview tip → Fix the cause (log rotation), not only the symptom.
More on Volumes, storage and data
A Postgres container was removed and the data is gone. How should it have been run?BeginnerBind mount or named volume for local development of a Node app?BeginnerHow do you back up a named volume?IntermediateTwo containers must share files. What are your options?BeginnerA container needs a writable temp area but the root filesystem is read-only.IntermediateMoving a database volume from one Docker host to another.Intermediate