Skip to content

Conversation

@sudiptob2
Copy link

zstd compression is quite popular compared to the default gzip. But to use zstd, we need to pass several parameters. For example:

docker buildx build --output type=image,oci-mediatypes=true,compression=zstd,push=true,force-compression=true --provenance=false .

We can use Bash aliases or scripts to make this easier, but it would be simpler if buildx allowed setting defaults for --output flag.

A possible implementation has been added to this PR.

@polarathene
Copy link

polarathene commented Mar 5, 2025

--provenance=false

This is due to wanting to avoid the docker-specific additions to the index manifest right? It should be avoidable with BuildKit's oci-artifact=true AFAIK.

That said upstream has also discussed intent to switch to both OCI settings as default in future, which would simplify this a bit further for you.


Related --compression option.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants