Unable to login into private docker registry (v2.0)
The goal is to secure the registry using SSL (using self-signed ssl cert) and username/password authentication. This all seems to go well, when i try to navigate via browser to private docker registry using :
https://<private-docker-reg>:443/v2/ I get a prompt to provide a username and password and i get correct output in this case
But when i try to login using the docker client i seem unable to login:
> docker login https://<private-docker-reg>:443 > Username: foo > Password: bar > Email: > > FATA Error response from daemon: v1 ping attempt failed with > error: Get https://<private-docker-reg>:443/v1/_ping: x509: > certificate signed by unknown authority. If this private registry > supports only HTTP or HTTPS with an unknown CA certificate, please add > `--insecure-registry <private-docker-reg>:443` to the daemon's > arguments. In the case of HTTPS, if you have access to the registry's > CA certificate, no need for the flag; simply place the CA certificate > at /etc/docker/certs.d/<private-docker-reg>:443/ca.crt
In trying to get around this issue i modified my
/etc/default/docker file and added the following line on my docker client laptop:
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry <private-docker-reg>:443"
Restarted the docker daemon, but no luck so far…
Any hints or tips to get around this issue??
One Solution collect form web for “Unable to login into private docker registry (v2.0)”
In order to use Docker Registry v2 you need to have at least docker client version 1.6.0 or higher. Run the following command to verify your docker CLI version:
As per docker registry documentation:
If a docker client has a version less than 1.6, Nginx will route its requests to the 1.0 registry. Requests from newer clients will route to the 2.0 registry.