Skip to content

Instantly share code, notes, and snippets.

@gquittet
Created October 16, 2023 12:29
Show Gist options
  • Save gquittet/4b306a0e1603699bf66051c4745b392d to your computer and use it in GitHub Desktop.
Save gquittet/4b306a0e1603699bf66051c4745b392d to your computer and use it in GitHub Desktop.
Docker sum images size
#!/usr/bin/env bash
docker image ls -a | awk -F ' ' '{ print $7 }' | tail +2 | sed 's/B/i/' | numfmt --from=auto | awk '{n += $1}; END{print n}' | numfmt --to=iec-i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment