Registry v2 - Token Auth example

Hello,

I have been playing around with the new docker registry v2 lately and I was wondering if there is a more exhaustive documentation (or examples) on how to configure the private registry v2 to use the Token Authentication than the one in the website or in GitHub.

Any help is appreciated and Thanks for the great work!

C

Hi Carlo,

would you happen to have the Registry v2 endpoint? I’m unable to find this anywhere and get stuck @ “https://registry.hub.docker.com/v2/ does not appear to be a v2 registry endpoint”…

Thanks,

Dan

Hey Dan,

I am not sure docker hub is already supporting the new API. I did not test it yet. I have been deploying the private registry docker container in my cluster and accessing it.
Here is the link to the documentation:

if you do HTTP requests through curl or a web browser http(s)://:5000/v2/ you can get the API of the container.

Hope this helps,

C

indeed: “Scott Johnston, SVP of Product, Docker, Inc, told ServerWatch that the plan is to transition Docker Hub to Registry 2.0 later in April.” (from http://www.serverwatch.com/server-news/docker-engine-1.6-debuts-alongside-docker-registry-2.0-and-compose-1.2.0.html)…

Thanks for getting my head out of the sand, Carlo!

Hello Carlo,
Were you able to utilize token auth feature? I’m close, but it seems the token I’m generating isn’t exactly what the registry is looking for.

A year later, but did either of you get it? I ended up implementing my own token auth lib in both go and ruby. If you want the links, ask here.

Would love the links…

Thanks…

With pleasure. Here https://github.com/deitch/docker_registry2

I have branches open on my laptop to add pulls and pushes as well. No reason to need to talk to a docker engine daemon to pull and push when it is just an image. Also, if you are relabelling, e.g. pull-tag-push, that whole thing can be done via API.

But the client I was working with on it didn’t have need for those features, so I ran out of time. Would love to add those as well, when someone is ready.