Interview Prep/Linux/Disk space, inodes and filesystems

`/var/lib/docker` keeps filling the root disk on a build host.

BeginnerTroubleshootingDisk space, inodes and filesystems
Answer

Likely causes → Dangling images, build cache and stopped containers accumulate.

Diagnose →

docker system df -v
sudo du -sh /var/lib/docker/*

Fix → docker system prune -af --filter "until=72h" and docker builder prune -af. Move Docker's data root to a separate volume ("data-root": "/data/docker" in /etc/docker/daemon.json).

Prevent → Scheduled prune job on build hosts and a dedicated volume for container data.

All Linux questions Roadmap: Linux

More on Disk space, inodes and filesystems