Skip to content

Instantly share code, notes, and snippets.

@alambike
Last active February 5, 2019 12:13
Show Gist options
  • Save alambike/e3ca4ef61e545664c03554da41c5223e to your computer and use it in GitHub Desktop.
Save alambike/e3ca4ef61e545664c03554da41c5223e to your computer and use it in GitHub Desktop.
docker, size of all running container write layer
#!/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