-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: support oci zstd compression #53
Conversation
@steven-halaka Thanks a lot for your contribution! There still seems to be some regression with normal Docker images such as |
Apologies, I rushed to share as soon as my use case passed. I'll see if I can get this cleaned up with tests passing. |
It seems the regression was due to the fact that both zstd and gzip io.Reader implementations don't fully validate until Read is called. I updated the brute-force detection. Alternatively, dive could perform mimetype detection using
It also seems that using the containerd-snapshotter was a large component of my original issue. Without it, docker engine seems to always save/export plain tar files. A workflow job using I also added a bit of detection for OCI images without a manifest.json (it's manifest is different). That file is not actually part of the OCI spec, but a compatibility created by docker. Instead, dive attempts to find the config blob and uses the already collected layers to generate a compatible manifest.
Finally, here's a small suite of testing I ran locally with and without containerd-snapshotter, but I'm not sure how it best fits into the validation workflow jobs. Perhaps some new
Sorry for the wall of text, but thank you for your work on this repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steven-halaka Thanks a lot for contributing this PR and going the extra mile to get it working! ❤️
I've added some acceptance tests based on your suggestions to ensure we're not running in any regressions in the future.
You fork of dive is much appreciated. I've been using it but had an issue reading my oci layers compressed with zstd (
type=image,force-compression=true,compression-level=3,compression=zstd
). Perhaps this could be of use...Using zstd library from buildx, attempt to uncompress zstd layers.