Docker Community Forums

Share and learn in the Docker community.

DTR api /v1/_ping returned 404


(Tracyliu) #1
  1. I installed Docker Trusted Registry on VM1.

  2. On VM2, I run this command to get DTR’s certificate:
    openssl s_client -connect dtr.myvm.com:443 -showcerts </dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee -a /tmp/dtrinstall/server.pem

  3. On VM2, I run this command
    curl --cacert /tmp/tracy/server.pem --user admin:password https://172.16.12.116/v1/_ping
    I got following response:

404 Not Found

404 Not Found

The requested URL was not found on this server. Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!

URL: https://172.16.12.116/v1/_ping
Server: 1ab0a9ee32ac
Date: 2015/10/02 03:22:47

Powered by Tengine/2.1.0

This /v1/_ping used to work when we using docker free private registry. Is this API changed in DTR? If so, what is the new one?


(Jeff Anderson) #2

Hello,

DTR is a v2 registry only. The open source registry that you were using before was very specifically a v1 registry: https://github.com/docker/docker-registry

The old v1 registry has been deprecated in favor of the new v2 registry: https://github.com/docker/distribution

/Jeff


(Tracyliu) #3

Hi Jeff,

Thanks for your reply.

Our product can deploy a pattern with docker container by connecting docker private registry (i.e. the v1 registry as you said). Now I am working on enabling our product work with Docker Trusted Registry (DTR).

We configure docker registry url and test connection. Test connection used API /v1/_ping, and I found it was not working for DTR (v2 registry).

I looked through https://github.com/docker/distribution/blob/master/docs/spec/api.md Docker Registry HTTP API V2, I didn’t find any api for “_ping”, but API Version check GET /v2/ seems working for this purpose. Could you please confirm GET /v2/ can work as a replacement of v1’s /v1/_ping? Or you know a better option?


(Jeff Anderson) #4

GET /v2/ is a perfectly acceptable endpoint that compliments the /v1/_ping

Cheers!


(Tracyliu) #5

HI Jeff,

Thanks for your confirmation. This topic can be closed.