-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for zstd layer #333
Comments
Yes, this would be really useful. Both being able to create new image layers as zstd-compressed as well as the ability to convert existing layers to zstd (similar to the buildkit |
So I looked into how this project handles layers, and ultimately support for this needs to be added to the crane tool for it to work. A new crane command ( |
we had discussions around layer conversion before, generally, it's a bad idea AFAICT due to changing digests, etc. This needs a RFC before an implementation.
this needs to be fixed there first, then we can allow zstd layers here in rules_oci. You are more than welcome to try it out. |
Sure, the layer and image digests would all change but such an image conversion would be hermetic. The same input digest would result in the same output digest assuming that the compressor, compression level, and crane version stayed the same. What about something like this?
|
I am a little hesitant to introduce another rule to our public API. And one of the design decisions we made was that rules_oci does not get involved in the manipulation/generation of layers. This rule will not only expand the public API but also violate that decision. Not to mention the increase in the complexity of rules_oci because this rule doesn't just change the compression, but reconstructs the whole image. (manifest, config, layers etc...) And I think it is out of scope for this issue. Please make a new issue for "conversion" of existing images. |
This #385 would basically bring zstd support for free |
How so? |
pure zstd support as requested by @gdippolito only needs the underlying system to support it; the PR I linked is switching to native bsdtar which does zstd out of the box |
@yetanotheralex could you give an example of how to enable zstd compression? |
Pending google/go-containerregistry#1798 or google/go-containerregistry#1827 would provide support for adding pre-compressed tar files. |
I have a PR #550 that fixes this. |
zstd supported was added in #550 |
Hello!
Thanks for starting off this project.
I was wondering if
rules_oci
supports zstd as image layers? In the rules_docker repository there were a couple of discussions about it see here and there was also an attempt to add support in this forkFor what concerned running the containers
containerd
supports zstd layers for quite some time now (1.5 May 2021) so it should not create any problems at runtime. Considering the speed difference ofzstd
compared withgzip
compression I think it would give a good speed up for both image creation and extraction.From my understanding bazel has native support for zstd since 5.1 see here do you think this project would support that? We are currently using
rules_docker
but we will be very happy to move torules_oci
if we can get some new features in.Thanks
The text was updated successfully, but these errors were encountered: