Skip to content

Instantly share code, notes, and snippets.

@jukben
Forked from jalogut/docker_space_cheat_sheet.md
Created February 15, 2019 12:28
Show Gist options
  • Save jukben/b9814f5b42a8bc178bcb08d2e2183531 to your computer and use it in GitHub Desktop.
Save jukben/b9814f5b42a8bc178bcb08d2e2183531 to your computer and use it in GitHub Desktop.
Cheat sheet to check disk usage on docker. Identify what takes most of your space

Total disk size configuration (Mac)

ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Total disk usage (Mac)

du -h ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Detailed disk usage

docker system df

Space used by each container, image and volume

docker system df -v

Filter only >= 1GB

docker system df -v | grep GB

Space used by running containers

docker ps -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment