docker image rm buildkit stuff?

This commit is contained in:
Ralf Vogler 2025-05-25 11:35:44 +02:00
parent 07a2c81f05
commit b8fbc0a95d

View file

@ -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 '```'