containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
7.9k stars 587 forks source link

Support `--compress` on build command. #2801

Closed austinvazquez closed 4 months ago

austinvazquez commented 7 months ago

What is the problem you're trying to solve

I have a use case which uses docker build --compress to compress the build context using gzip.

Describe the solution you'd like

I'd like to have nerdctl build support --compress flag.

Additional context

Use case is https://github.com/runfinch/finch/issues/571

yankay commented 6 months ago

HI @austinvazquez

The nerdctl uses --local=context=<BuildContext> in buildkit to build image. But the buildkit has no args of compress context.

The compression of build context is useful to build remotely. I need clarification on how to complete the feature and whether the feature is reasonable.

austinvazquez commented 4 months ago

Hi @yankay apologies missed the notification on this. After further research, it looks like my confusion was Docker CLI documentation detailed docker build --compress as enabling gzip compression for the build context. I did not realize this is the default behavior of buildkit, thus by default nerdctl implicitly implements the desired behavior.

So makes sense to close this as not required. Thanks for taking a look!