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

Add oci/layout.Reader #1563

Open
tanguofu opened this issue Jun 2, 2022 · 3 comments · May be fixed by #2567
Open

Add oci/layout.Reader #1563

tanguofu opened this issue Jun 2, 2022 · 3 comments · May be fixed by #2567
Labels
kind/feature A request for, or a PR adding, new functionality

Comments

@tanguofu
Copy link

tanguofu commented Jun 2, 2022

when skeopeo copy many images into one oci repo, how can i get the images name?
for example the index.json:

"schemaVersion":2,"manifests":[{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:2ba9d0aec419c8dd71c584de4b726001e549514f770c5f3058775262a734a4d3","size":1813,"annotations":{"org.opencontainers.image.ref.name":"platform/mysql:8.0.27-aarch64"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:a4cfae91a5fcd73287fce2a701264da5241c6778b29877ca57f6bc74c50eba70","size":2308,"annotations":{"org.opencontainers.image.ref.name":"platform/devops-tools:latest-aarch64"}}
...

there only a API https://github.com/containers/image/blob/main/oci/layout/oci_transport.go#L219

func LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, error) {

so is it acceptable to add a API get [] imgspecv1.Descriptor of all the name within oci repo ? , such as:

func LoadAllManifestDescriptor(imgRef types.ImageReference) ([] imgspecv1.Descriptor, error) {

and i would very like tocontribute with a PR.

many thanks.

@tanguofu tanguofu changed the title how to get all tags from oci repo dir? how to get all images name from oci repo dir? Jun 2, 2022
@vrothberg
Copy link
Member

vrothberg commented Jun 2, 2022

Thank you for reaching out, @tanguofu.

Can you describe on a high level what you are trying to do? Do you want to use skopeo copy or do you want to inspect the images names via skopeo inspect?

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 2, 2022

If I understand the request correctly, see #1381 ’s Reader (and compare docker/archive). Introducing a similar API for oci/layout (with much less state to maintain) would make sense to me.

@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Dec 9, 2022
@mtrmac mtrmac changed the title how to get all images name from oci repo dir? Add oci/layout.Reader Dec 9, 2022
@mtrmac
Copy link
Collaborator

mtrmac commented Sep 20, 2024

Some variant of this will probably happen in #2567 .

@mtrmac mtrmac linked a pull request Sep 20, 2024 that will close this issue
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants