Package: podman
Version: 5.7.0+ds2-3
Severity: normal
podman has two squashing build parameters:
--squash
Squash all of the image's new layers into a single new layer; any
preexisting layers are not squashed.
--squash-all
Squash all of the new image's layers (including those inherited from a
base image) into a single new layer.
The '--squash' parameter doesn't work. Note from the below session
excerpt, the image checksum for '--squash' and '<nothing>' are
identical, and contain 23 layers.
Expected behaviour would be base image + 1. In this case base image has
22. (I can provide this container source if requested, but it's not
relevant)
$ podman build -t nosquash ./
$ podman build --squash -t squash ./
$ podman build --squash-all -t squashall ./
$ skopeo inspect containers-storage:localhost/nosquash | jq '.Layers | length'
23
$ skopeo inspect containers-storage:localhost/squash | jq '.Layers | length'
23
$ skopeo inspect containers-storage:localhost/squashall | jq '.Layers | length'
1
$ podman images | head
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/squashall latest 539639a5c074 5 minutes ago 1.07 GB
localhost/squash latest 8b6e819c2b11 6 minutes ago 1.08 GB
localhost/nosquash latest 8b6e819c2b11 6 minutes ago 1.08 GB
-- System Information:
Debian Release: 13.3
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-security'), (500, 'oldoldstable'),
(500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.16.9+deb14-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages podman depends on:
ii conmon 2.1.12-4
ii golang-github-containers-common 0.66.0+ds2-3
ii init-system-helpers 1.69~deb13u1
ii libc6 2.41-12+deb13u1
ii libgpgme45 2.0.1-2
ii libseccomp2 2.6.0-2
ii libsqlite3-0 3.46.1-7
ii libsubid5 1:4.17.4-2
ii netavark 1.14.0-2
ii runc 1.1.15+ds1-2+b4
Versions of packages podman recommends:
ii buildah 1.42.1+ds1-2
ii ca-certificates 20250419
ii containers-storage 1.57.2+ds1-1+b2
ii criu 4.1.1-1
ii dbus-user-session 1.16.2-2
ii libcriu2 4.1.1-1
ii passt 0.0~git20250503.587980c-2
ii slirp4netns 1.2.1-1.1
ii tini 0.19.0-3+b5
ii uidmap 1:4.17.4-2
Versions of packages podman suggests:
ii containernetworking-plugins 1.1.1+ds1-3+b17
ii docker-compose 2.26.1-4
ii iptables 1.8.11-2
-- no debconf information
--
👱🏻 Jonathan Dowland
✎ [email protected]
🔗 jmtd.net