Home > Net >  Browsing docker repositories
Browsing docker repositories

Time:05-06

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?

CodePudding user response:

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

CodePudding user response:

  1. About URL: Here you will find how to change default registry URL in docker. If you set mcr.microsoft.com instead of hub.docker.com docker will try to search for ubuntu image inside Microsoft registry.
  2. About TAG: You able to use latest tag for ubuntu image because creators of this image care about usability and added latest tag to latest version. If Microsoft team don't care about usability of own software it can't be improved. The only possible way how to use latest is pulling image into own local repository and adding tag latest
  • Related