Docker Community Forums

Share and learn in the Docker community.

How can I list tags for a repository?

dockerhub

(Ben Kuhl) #1

I’m trying to use the API to list the tags for DockerHub repositories. We’ll see I’m trying for bkuhl/game-watcher/. Both https://hub.docker.com/v2/bkuhl/game-watcher/tags and /v2/bkuhl/game-watcher/tags/list return 404s (when I’m authenticated). The only documentation on this I can find is located at https://docs.docker.com/registry/spec/api/#listing-image-tags. Though I’m not completely sure this documentation is for DockerHub itself.

How can I list the tags for a repository?


(Ben Kuhl) #2

Apparently the URL is https://hub.docker.com/v2/repositories/bkuhl/game-watcher/tags as of some random gist I found online. Is there any official documentation for this?


(Acourtis) #3

See CLI utility: https://www.npmjs.com/package/docker-browse

Allows enumeration of tags and images.


(Tsenkov) #4

Does anyone know what is the reason this hasn’t been implemented for the CLI tooling of docker?

Shouldn’t it be something as simple as this?

$ docker image search --list-tags <path/to/repo>