Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save windsting/f823dcea5ad460aa1caa6d47b2390aad to your computer and use it in GitHub Desktop.
Save windsting/f823dcea5ad460aa1caa6d47b2390aad to your computer and use it in GitHub Desktop.
List repository on private docker registry v2.

from https://stackoverflow.com/questions/39609189/how-to-list-images-in-docker-registry-being-on-registry-server

The docker CLI doesn't have functionality to search a registry, but you can use the registry's REST API. Assuming you're using the registry:2 image, then you can list all the repositories using the catalog endpoint:

$ curl https://my-registry:5000/v2/_catalog
{"repositories":["busybox","redis","ubuntu"]}

And then you can query the tags for a repository:

$ curl https://my-registry:5000/v2/busybox/tags/list
{"name":"busybox","tags":["2","latest"]}

These two API are useful, and the rest of them can be accessed with docker CLI, Here's the full Registry API spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment