且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过HTTP API在Docker集线器上列出Docker映像的标签

更新时间:2023-12-05 13:43:22

Docker做了一个巨大的注册表的重构:注册表v2.0。



有了这个全新的版本,出现了一个新的认证系统,所以v1.0的基本认证将不再工作了。 / p>

您可以在这里找到有关v2.0 auth的更多详细信息: https://docs.docker.com/v1.6/registry/spec/auth/token/



由于v1.0已弃用,您应该转到注册表v2.0。


I would like to list the tags of a docker image official docker hub through its HTTP interface but I am a bit confused. As there seems to two versions of them:

I managed to get them through sending a GET request to this endpoint: https://index.docker.io/v1/repositories/{my-namespace}/{my-repository}/tags along with basic auth credentials.

I am not sure if there is a correct one among them but which should I be using?

Docker made a huge refactor of the registry: registry v2.0.

With this brand new version, comes a new authentication system so the basic auth of v1.0 will not work anymore.

You can find more details about the v2.0 auth here: https://docs.docker.com/v1.6/registry/spec/auth/token/

As v1.0 is deprecated, you should move forward to registry v2.0.