-
Notifications
You must be signed in to change notification settings - Fork 531
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
Q: easier way to grab/read a layer? #1150
Comments
Does Here's something that's kinda gross:
So this uses |
Does the image always have a single layer? |
As far as I know yeah. I could adapt the script/function to dump all layers though |
As you mentioned, we could address some of this as part of #1011 by actually inspecting the layer media types rather than assuming tarballs. IMO a reasonable heuristic would be: if len(layers) == 1 {
if !isTar(layers[0].MediaType) {
rc, err := layers[0].Uncompressed()
if err != nil {
return err
}
defer rc.Close()
_, err := io.Copy(w, fs)
return err
}
} For images with a single, non-tarball layer, it makes sense to me to just write out the layer contents to stdout with
I'm not sure how that would work with multiple layers -- you'd need something like your or jason's script. Another approach might be to add a flag to |
Related #1011
If I want to read provenance from an
.att
image pushed by tekton chainsI currently have to do the following:
I can shorten this and write a script etc but is there a better way to just grab
e2307fd561d470611ad337485f0c53b7b8b79473005508788a6c5a9d40faf563.tar.gz
(or the contents) in the first place?This is a function I've written
The text was updated successfully, but these errors were encountered: