nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

Support `--compress` on build command.

Open austinvazquez opened this issue 1 year ago • 1 comments

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

austinvazquez avatar Feb 06 '24 16:02 austinvazquez

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.

yankay avatar Feb 20 '24 09:02 yankay

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!

austinvazquez avatar May 14 '24 19:05 austinvazquez