Skip to content

Gzip squashed layers - #263

Merged
rnc merged 1 commit into
goldmann:mainfrom
rnc:fix-260-gzip-squashed-layer
Nov 10, 2026
Merged

rnc merged 1 commit into
goldmann:mainfrom
rnc:fix-260-gzip-squashed-layer

Conversation

@rnc

@rnc rnc commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

With the containerd image store (the default from Docker 29), the squashed layer is pushed as the raw tar docker-squash wrote. The classic store recompresses on push, so this only shows up on containerd. In my test, a squashed layer that was 2.6 MB gzip went out as a 24.6 MB raw tar.

This change gzips the squashed layer.tar in V2Image after its diff_id has been computed. The config's diff_id is still the digest of the uncompressed tar. The manifest, config and chain IDs don't change, and moved layers aren't touched.

Fixes #260. It builds on #261, which is already merged.

@rnc
rnc requested a review from goldmann November 9, 2026 11:21
@rnc
rnc merged commit 0702f2b into goldmann:main Nov 10, 2026
32 checks passed
@rnc
rnc deleted the fix-260-gzip-squashed-layer branch November 10, 2026 09:34
@reneleonhardt

Copy link
Copy Markdown

Great to see gzip support! 🚀
Could zstd be added too?

@rnc

rnc commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Great to see gzip support! 🚀 Could zstd be added too?

I guess thats a possibility ; the only problem is that there would have to be an option exposed to select the compression type. This should really be entered as an issue. PRs welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker 29 Images aren't compressed after squash

3 participants