How to sort my Docker images by size with `docker images` command?

docker images supports –format flag to customize output -> https://docs.docker.com/engine/reference/commandline/images/#format-the-output

Adding custom formatting and using sort does the trick:

docker images --format "{{.ID}}\t{{.Size}}\t{{.Repository}}" | sort -k 2 -h

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)