From b8fbc0a95d7684e6009816e0b2f81438529aba60 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Sun, 25 May 2025 11:35:44 +0200 Subject: [PATCH] docker image rm buildkit stuff? --- .github/workflows/docker.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 341a4b0..bc7b76d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -102,12 +102,15 @@ jobs: emd "# Compressed (download) sizes:" dockersize() { docker manifest inspect -v "$1" | jq -c 'if type == "array" then .[] else . end' | jq -r '[ ( .Descriptor.platform | [ .os, .architecture, .variant, ."os.version" ] | del(..|nulls) | join("/") ), ( [ ( .OCIManifest // .SchemaV2Manifest ).layers[].size ] | add ) ] | join(" ")' | numfmt --to iec --format '%.2f' --field 2 | sort | column -t ; } cmd dockersize "$IMG" - cmd docker buildx history inspect - cmd docker buildx du - ## in CI with buildx `docker image ls` just lists moby/buildkit and tonistiigi/binfmt since the multi-arch build is pushed to registry instead of loaded locally, so we need to pull it first (cached anyway) - cmd docker pull "$IMG" + ## don't need the following in job summary, but nice to have in full log + docker buildx history inspect + docker buildx du + ## not needed locally, but in CI with buildx `docker image ls` just lists moby/buildkit and tonistiigi/binfmt since the multi-arch build is pushed to registry instead of loaded locally, so we need to pull it first (cached anyway) + docker pull "$IMG" + docker image rm moby/buildkit + docker image rm tonistiigi/binfmt emd '# Uncompressed size (max, not size on disk due to sharing):' - cmd docker image ls + cmd docker image ls --tree emd '# size = unique + shared:' cmd docker system df -v emd '```'