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.
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.
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
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With