summary refs log tree commit diff
path: root/.local/share/navi/cheats/robertgzr__cheats/docker.cheat
blob: c89d1413810c3565f5a20aa89d39410340bc3f7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
% docker

# List images, sorted by size
docker image ls --format '{{.Size}}\t{{.ID}}\t{{.Repository}}:{{.Tag}}' | sort -h

# List images, sorted by creation time
docker image ls --format '{{.CreatedAt}}\t{{.ID}}\t{{.Repository}}:{{.Tag}}' | sort

# List images, include architecture
docker image ls --format '{{.Size}}\t{{.ID}}\t{{.Repository}}:{{.Tag}}' \
  | awk '{"docker inspect "$2"| jq -r .[].Architecture"|getline arch; printf "%s\t%s\t%s\t%s\n", $1, $2, arch, $3}' \
  | sort -h