skopeo
skopeo copied to clipboard
RFE: Skopeo registry-search (like (podman search))
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
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.
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.
I would like to see these added to skopeo, if possible.
A friendly reminder that this issue had no activity for 30 days.
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.
A friendly reminder that this issue had no activity for 30 days.