summary refs log tree commit diff
path: root/.local/share/navi/cheats/robertgzr__cheats/docker.cheat
diff options
context:
space:
mode:
Diffstat (limited to '.local/share/navi/cheats/robertgzr__cheats/docker.cheat')
-rw-r--r--.local/share/navi/cheats/robertgzr__cheats/docker.cheat13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/share/navi/cheats/robertgzr__cheats/docker.cheat b/.local/share/navi/cheats/robertgzr__cheats/docker.cheat
new file mode 100644
index 0000000..c89d141
--- /dev/null
+++ b/.local/share/navi/cheats/robertgzr__cheats/docker.cheat
@@ -0,0 +1,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