Skip to content

build: add support for zstd image compression - #2376

Open
milas wants to merge 1 commit into
chainguard-dev:mainfrom
milas:milas/zstd
Open

build: add support for zstd image compression#2376
milas wants to merge 1 commit into
chainguard-dev:mainfrom
milas:milas/zstd

Conversation

@milas

@milas milas commented Aug 5, 2026

Copy link
Copy Markdown

Changes

A pretty mechanical plumbing of a new --compression flag through the various machinery.

The default is still gzip for backwards compatibility, but --compression=zstd can be specified as an alternative.

Container runtimes have good zstd support these days and it compresses better/with less CPU than gzip.

Context

Starting with google/go-containerregistry v0.21.8, it's possible to make images with correctly named ZSTD-compressed layers.

(Previously, it was possible to write zstd-compressed layer data, but it'd still be .tar.gz, which was confusing at best but more likely to break downstream tooling.)

See google/go-containerregistry#2382

The go.mod here already picked that up, so no dependency update is necessary.

@milas

milas commented Aug 5, 2026

Copy link
Copy Markdown
Author

FYI I did a quick scan of other open issues/PRs -- I do see there's WIP for adding EROFS (very cool!) @ #2249, which I don't think really conflicts. Arguably, this can work together with that since EROFS layers can similarly be gzip/zstd/etc compressed.

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.

1 participant