dockerdocker-repository

Browsing docker repositories


It looks like to me that when those repositories under hub.docker.com, I can use them directly by name. Let say, ubuntu. I can use it in file Dockerfile directly by "FROM ubuntu:latest", and can know any tags other than latest in the link https://hub.docker.com/_/ubuntu?tab=tags

But when it comes to repo not under hub.docker.com. Take Microsoft sdk as an example. It is under mcr.microsoft.com/dotnet/sdk (https://github.com/microsoft/containerregistry). I cannot use the same way as above to know what is the available tags. Instead, I need to read the "Readme.md" there and then I know the way to query the tags is by the link https://mcr.microsoft.com/v2/dotnet/sdk/tags/list.

Is there any universal way to browse the repositories and the available tags for a specific repositories?


Solution

  • For example, if you have a registry at location: registry.example.com:5000 and HTTPS proxy, you could use the address: https://registry.example.com:5000/v2/_catalog to list all repositories.

    Similarly for tags at https://registry.example.com:5000/v2/<repo_name>/tags/list

    References:
    https://docs.docker.com/registry/spec/api/#listing-repositories https://docs.docker.com/registry/spec/api/#listing-image-tags