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
[WIP] Configurable layer compression during push #34610
Initial work to fix #1266 by making compression configurable. This PR is far from complete, but I'd like to collect feedback before investing any more time in the wrong direction. I'm far from a docker internals or go expert, so I can use guidance on all levels (testing, documentation, code style, design,...).
This PR currently just extracts the configuration of the compressor from the push internals up to the
As stated in the original issue, there are some open points:
I'm leaning towards just allowing gzip levels, but without excluding a future evolution to support custom algorithms altogether. Also, I did not check what is needed on the metadata/pull level to be able to support other algorithms during pull. This works transparently as long as we stick to gzip, but I can imagine we need additional support if we want to use a different algorithm.
Would passing the compression algo/options using the HTTP headers of the push API endpoint be a viable solution? It looks like the easiest and least intrusive at the API level.
A third point is: if a layer is already uploaded to a registry with a different compression scheme, then any new pushes of that layer would be skipped, even if the compression would be different. This is not an issue per-se, but it is something to be aware of.
Thanks for the response @cpuguy83.
What does this mean with regard to the original issue? I’d very much like to eventually see a way to disable compression for pulls from a private registry; how it is implemented (or at which layer the compression happens) is not important to me.
Is there work being done in this direction that I can track (or maybe help with)? As far as I can see the original issue has also been lacking updates for a while.