Created
March 17, 2023 15:09
-
-
Save bmritz/73e69874fb6e1be56f027489e9ff4105 to your computer and use it in GitHub Desktop.
List docker images sorted by size
This file contains hidden or 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
# https://tunzor.github.io/posts/docker-list-images-by-size/ | |
docker image ls --format "{{.Repository}}:{{.Tag}} {{.Size}}" | \ | |
awk '{if ($2~/GB/) print substr($2, 1, length($2)-2) * 1000 "MB - " $1 ; else print $2 " - " $1 }' | \ | |
sed '/^0/d' | \ | |
sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment