skopeo icon indicating copy to clipboard operation
skopeo copied to clipboard

RFE: Skopeo registry-search (like (podman search))

Open hiranchaudhuri1 opened this issue 4 years ago • 7 comments

I am just starting to work with skopeo. The main reason is I need a tool to support image management - mainly deletion of no longer needed images. I stumble over the fact that I cannot inspect the registry and list repositories. Rather I need to know repositories upfront. While this is not a problem since I know what repositories to manage I am wondering why such functionality is not contained in skopeo.

Thus I'd suggest to implement a list-repositories, which would invoke the _catalog function as documented here: https://docs.docker.com/registry/spec/api/#listing-repositories

hiranchaudhuri1 avatar Jan 19 '21 14:01 hiranchaudhuri1

Thanks for your report.

There is podman search for those registries that do support that API; it would make some sense to expose the same c/image functionality by Skopeo, but given the existence of the Podman subcommand, there hasn’t been a strong need to provide it in Skopeo as well.

Note that the /v2/_catalog API is really unreasonable for any large-scale registry (even the Docker Hub does not allow using it!) — the V1 server-side search is much more scalable, OTOH also very inconsistent as to syntax/semantics across the different registry implementations.

mtrmac avatar Jan 19 '21 15:01 mtrmac

Thank you for the hint towards 'podman search'. I was not aware of that.

Would it still make sense to have either list or search in skopeo? Or even both for registries that support it... Otherwise we can close this issue.

hiranchaudhuri1 avatar Jan 20 '21 10:01 hiranchaudhuri1

I would like to see these added to skopeo, if possible.

rhatdan avatar Jan 21 '21 14:01 rhatdan

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

github-actions[bot] avatar Jun 04 '21 00:06 github-actions[bot]

Adding that command is pretty straight forward as the podman search code mostly lives here: https://github.com/containers/common/blob/main/libimage/search.go

skopeo search can just use libimage but needs to do the plumbing in the front-end + docs + tests.

vrothberg avatar Mar 22 '22 13:03 vrothberg

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

github-actions[bot] avatar Apr 22 '22 00:04 github-actions[bot]