manifest-tool
manifest-tool copied to clipboard
v2.0 doesn't include layer data in raw output
I'm attempting to upgrade from 1.0.3 to 2.0.0 of the manifest-tool. With 1.0.3, my implementation made use of the inspect --raw
option to parse the layer metadata. But in 2.0.0, no layer metadata is output when using the --raw
option. It only provides the following example output:
{
"mediaType":"application/vnd.docker.distribution.manifest.list.v2+json",
"digest":"sha256:a5c83e4f6c03d785c37eb06549f0ec5d0daa761e010805b0ad39f698d89d10c2",
"size":2175
}
Was this intentional? Is there a way to get machine-readable data for the layers?
The --raw
mode in 1.x was based around a contrived object type/struct of various information packed together that came from the original codebase this tool was based on. It wasn't a data type based on the actual content (e.g. an OCI image or image config) so I left it behind with the significant refactoring for 2.x.
Obviously the fetch flow even in 2.x has access to some of this data (assuming what you are looking for is just image metadata from the manifest JSON) so it could be possible to expand --raw
to at least dump the whole tree of image metadata if that would be sufficient?
Obviously the fetch flow even in 2.x has access to some of this data (assuming what you are looking for is just image metadata from the manifest JSON) so it could be possible to expand
--raw
to at least dump the whole tree of image metadata if that would be sufficient?
Yes, that would be sufficient. In my case, all I need is the digests of each of the layers.
I wonder if something like crane or regclient might meet your specific needs a little more closely? :innocent:
With v2.1.0 release, there is now JSON output with --raw
and even OCI config expansion when adding --expand-config
. Let me know if there are any additional concerns here.