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:
About URL:Here you will find how to change default registry URL in docker. If you setmcr.microsoft.cominstead ofhub.docker.comdocker will try to search forubuntuimage inside Microsoft registry.About TAG:You able to uselatesttag forubuntuimage because creators of this image care about usability and addedlatesttag 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 uselatestispulling image into own local repository and adding taglatest
