Skip to content

Instantly share code, notes, and snippets.

@r0mdau
Last active May 3, 2023 16:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r0mdau/7e5100ff175acf954f05e5124c3d3b7d to your computer and use it in GitHub Desktop.
Save r0mdau/7e5100ff175acf954f05e5124c3d3b7d to your computer and use it in GitHub Desktop.
Match docker overlay directory with container name
df -hi
apt install jq
cd /var/lib/docker/overlay2/
find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
docker inspect $(docker ps -qa) | jq -r 'map([.Name, .GraphDriver.Data.MergedDir]) | .[] | "\(.[0])\t\(.[1])"'
docker ps
docker images
@admejia2
Copy link

Excelent, thank you for shared

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