Problems setting up private docker registry.

1,863 views
Skip to first unread message

Dadepo Aderemi

unread,
Apr 22, 2019, 1:30:21 PM4/22/19
to Nexus Users

I am trying to set up a private docker registry but i am not having much luck.


I have created the registry in Nexus. I have tried various combination of enabling and disabling the HTTP and HTTPS connectors.


But each time I try to login by doing `docker login some-host` I get the following error:
`Error response from daemon: Get https://some-host/v2/: Service Unavailable`


Anyone with any advice on what I could be doing wrong?

Rich Seddon

unread,
Apr 22, 2019, 1:33:22 PM4/22/19
to Nexus Users
It looks like the docker daemon is not able to reach the Nexus Repo instance (so likely a network configuration problem).

You might try examining the docker daemon logs to see if there is more information:

Dadepo Aderemi

unread,
Apr 22, 2019, 3:11:54 PM4/22/19
to Nexus Users
Thanks for the suggestion. I did look into the logs, and the portion which I think is relevant that I see in the logs is:


2019-04-22 21:00:11.732371+0200  localhost com.docker.vpnkit[41290]: HTTP proxy --> 11.0.11.11:443 Host:some.domain.com:443 (Origin): Failed to connect to 11.0.11.11:443
2019-04-22 21:00:11.732438+0200  localhost com.docker.vpnkit[41290]: HTTP proxy: returning 503 Service_unavailable
2019-04-22 21:00:11.734439+0200  localhost com.docker.driver.amd64-linux[41291]: proxy << POST /v1.39/auth (30.337503ms)

Where some IP -> 11.0.11.11 is the address of the machine nexus is running. If I punch 11.0.11.11 into the web browser, the nexus interface loads at 11.0.11.11/nexus.

Any ideas what to troubleshoot next? 

Rich Seddon

unread,
Apr 22, 2019, 3:56:20 PM4/22/19
to Nexus Users
You need to configure a custom port or host name for the docker repository, and use that to connect.  The reason for this is that docker does not support connecting to registries that are running on any web context path other than "/".  See here for more information:


On Monday, April 22, 2019 at 12:30:21 PM UTC-5, Dadepo Aderemi wrote:

dad...@gmail.com

unread,
May 2, 2019, 1:04:32 AM5/2/19
to Nexus Users
Thanks Rich for the pointers...

I followed the instructions in the link you shared but had little success... Then i realized that the nexus registery i wanted to connect to was not running on https...

My question now is,is SSL/HTTPS an absolute necessity in other to have nexus configured as a private docker registry?

msu...@sonatype.com

unread,
May 2, 2019, 5:28:27 AM5/2/19
to Nexus Users

I followed the instructions in the link you shared but had little success... Then i realized that the nexus registery i wanted to connect to was not running on https...

My question now is,is SSL/HTTPS an absolute necessity in other to have nexus configured as a private docker registry?


It is Docker relies on secure connections using SSL to connect to the repositories. See the following section of the documentation.


Regards,
Mahendra
Reply all
Reply to author
Forward
0 new messages