- Beginner
- Data and disk
How it works
Every build leaves layers and cache, every docker run without --rm leaves a stopped container, every container log grows. When the disk is full, builds fail, databases stop writing and containers crash. The RECLAIMABLE column shows what nothing uses.
What breaks
Pruning volumes deletes every volume no container refers to at that moment: remove a database container, prune the volumes, and its data is gone for good. Clean in order: stopped containers, dangling images, build cache, and volumes only after checking what they hold.
In a terminal
docker system df
docker container prune -f
docker image prune -f
docker builder prune -f
See it break, then fix it
Write the Dockerfile or the compose file, type the docker commands, and watch a simulated server run them through reboots, upgrades and traffic. Free to start.