Skip to content
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

RFE: Add more kinds of annotations to (skopeo inspect) output #1583

Open
fgiloux opened this issue Mar 4, 2022 · 14 comments
Open

RFE: Add more kinds of annotations to (skopeo inspect) output #1583

fgiloux opened this issue Mar 4, 2022 · 14 comments
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue

Comments

@fgiloux
Copy link

fgiloux commented Mar 4, 2022

$ skopeo inspect docker://quay.io/fgiloux/fedora-httpd:latest --raw
{"schemaVersion":2,"config":{"mediaType":"application/vnd.oci.image.config.v1+json","digest":"sha256:a15eaef04d58fcca02f879d7c58d72a822b82cd42d427c1740542d49874ee912","size":1565},"layers":[{"mediaType":"application/vnd.oci.image.layer.v1.tar+gzip","digest":"sha256:9c6cc34637169910926efbf525620fc39873beb0b2b3ba9fdf30d8662a38e407","size":59023256},{"mediaType":"application/vnd.oci.image.layer.v1.tar+gzip","digest":"sha256:6609bfb7c2ef3f42eedea7dab9a69309682b5e65e7601a74f9b00e695ee4bc52","size":26244427}],"annotations":{"org.opencontainers.image.base.digest":"sha256:63fa666e22333d85eaa6684fba51efe4b48dc5f5ff7b194cdc1fa1f1290b5c32","org.opencontainers.image.base.name":"registry.fedoraproject.org/fedora:latest"}}

Mind that annotations are returned.

$ skopeo inspect docker://quay.io/fgiloux/fedora-httpd:latest 
{
    "Name": "quay.io/fgiloux/fedora-httpd",
    "Digest": "sha256:df05400702456755d883d895b8621253c2f4162f2edc5181dd4ca5d06781ba91",
    "RepoTags": [
        "latest"
    ],
    "Created": "2022-03-04T07:13:47.818472465Z",
    "DockerVersion": "",
    "Labels": {
        "io.buildah.version": "1.23.1",
        "license": "MIT",
        "name": "fedora",
        "vendor": "Fedora Project",
        "version": "35"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:9c6cc34637169910926efbf525620fc39873beb0b2b3ba9fdf30d8662a38e407",
        "sha256:6609bfb7c2ef3f42eedea7dab9a69309682b5e65e7601a74f9b00e695ee4bc52"
    ],
    "Env": [
        "DISTTAG=f35container",
        "FGC=f35",
        "container=oci",
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ]
}

Annotations are missing. It seems that there are not part of the output:
https://github.com/containers/skopeo/blob/main/cmd/skopeo/inspect/output.go

I think it would be useful. I was interested in getting the base image. For my use case I am fine with using --raw but I was a bit puzzled not to see the information when I did not specify the option and thought that I may not be alone.

@vrothberg
Copy link
Member

Thanks for reaching out, @fgiloux!

The request sounds reasonable to me. @mtrmac WDYT?

@mtrmac
Copy link
Collaborator

mtrmac commented Mar 4, 2022

Sure, in principle.

The details get a bit messy, because OCI allows annotations on so many things. I suspect we would want IndexAnnotations and IndividualManifestAnnotations (naming??) and perhaps even ConfigBlobAnnotations and something for every layer (along with reporting the layer’s size, which is another RFE somewhere around).

WRT an implementation approach, adding extra fields to the struct returned by c/image/types.Image.Inspect is possible without breaking the API, so that’s easily possible.

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

A friendly reminder that this issue had no activity for 30 days.

@tanguofu
Copy link

hello is there any fix plan? thanks

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 8, 2022

containers/image#1626 makes layer annotations available for skopeo inspect to expose.

@github-actions
Copy link

github-actions bot commented Sep 8, 2022

A friendly reminder that this issue had no activity for 30 days.

@mtrmac
Copy link
Collaborator

mtrmac commented Dec 5, 2022

… and #1738 includes layer annotations in the skopeo inspect output.

The index/manifest/config annotations are not yet exposed.

@mtrmac mtrmac changed the title result of Skopeo inspect is partial RFE: Add more kinds of annotations to (skopeo inspect) output Dec 5, 2022
@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Dec 7, 2022
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor

not stale

Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor

not stale

@rhatdan
Copy link
Member

rhatdan commented Jan 17, 2024

If this is something you want then I would recommend that you open a PR to introduce the concept.

Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue
Projects
None yet
Development

No branches or pull requests

6 participants