Skip to content

Instantly share code, notes, and snippets.

@biwhite
Last active February 22, 2025 08:57
Show Gist options
  • Save biwhite/5fbd93681e018ffacd40a00f8d3ac8b3 to your computer and use it in GitHub Desktop.
Save biwhite/5fbd93681e018ffacd40a00f8d3ac8b3 to your computer and use it in GitHub Desktop.
table of docker overlay sizes per container
docker inspect -f $'{{.Name}}\t{{.GraphDriver.Data.MergedDir}}' $(docker ps -aq) | \
while IFS=$'\t' read -r name where; \
do \
size=$(du -hs "$where" 2>/dev/null | awk '{print $1}'); \
echo -e "$name\t$where\t$size"; \
done | \
sort -h -k 3 | \
column -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment