Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for compressing build context during image build #25837
- What I did
Added support for optionally compressing build contexts when invoking
- How I did it
Added a new
- How to verify it
If you build it and use
- Description for the changelog
Is there any public API surface for getting the proto that's accessible from
I've added the docs as well if the maintainers decide they want to keep the flag.
@unclejack sure! As an example:
The size of the build context for
On a constrained bandwidth connection sending to a remote docker this reduction in size can be extremely valuable (I am frequently on connections where I can upload no more than 20-50k/sec when I'm outside the US/EU). Conversely, on a fast connection the overhead of gzip would quite possibly harm performance.
For a more extreme example, one of my personal projects has a docker build context size of 19MB (due to some text sitemaps). With compression enabled this drops to 2.2M, which is the difference between success and failure when sending a build context over a flaky 3G tethering connection.
I've replicated this behavior without native support in
This works, but is not particularly elegant or discoverable for users who might be facing similar issues.
Thanks @reaperhulk, I left one thought (before it's too late
Also, I did a quick scan of additional changes that are needed;
Otherwise looks great
Added the docs and shell autocomplete lines as requested!
I don't think adding to the builder reference is useful right now since as you pointed out the majority of the options aren't covered there. It would be nice to eventually find a good place to document that