Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the new docker hub api documentation?

Since docker 1.8 you can see that:

This API is deprecated as of 1.7. To view the old version, see the Docker Hub API in the 1.7 documentation.

But when I look at the new documentation There is nothing about the API access.

I thought it was based on Docker Trusted Registry but I can't make it work.

Commands like that works: curl -k https://registry.hub.docker.com/v1/repositories/ubuntu/tags but it's v1 deprecated api.

like image 443
michael_bitard Avatar asked Jun 28 '16 08:06

michael_bitard


People also ask

How do I find docker API version?

To see the highest version of the API your Docker daemon and client support, use docker version : $ docker version Client: Docker Engine - Community Version: 20.10. 0 API version: 1.41 Go version: go1.


2 Answers

V1 is deprecated. You can find the latest documentation here: https://docs.docker.com/registry/spec/api/

Here is a couple of example scripts using the api:

  • For a user account: https://gist.github.com/kizbitz/e59f95f7557b4bbb8bf2

  • For an organization account: https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721

like image 169
pedrorijo91 Avatar answered Oct 04 '22 18:10

pedrorijo91


I had to use Docker Hub API v2 for private repo in order to get list of all tags, example is here if anyone needs it:

  • https://gist.github.com/alexanderilyin/8cf68f85b922a7f1757ae3a74640d48a
like image 43
Alexander V. Ilyin Avatar answered Oct 04 '22 20:10

Alexander V. Ilyin