Last active
February 5, 2019 12:13
-
-
Save alambike/e3ca4ef61e545664c03554da41c5223e to your computer and use it in GitHub Desktop.
docker, size of all running container write layer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for d in $(docker ps -q); | |
do | |
container_layer=$(docker inspect --format '{{ .GraphDriver.Data.MergedDir }}' $d); | |
size=$(du -sh $container_layer/..|cut -f1); | |
echo "container $d escribe en $container_layer, ocupa $size"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment