Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login attempts to Nexus OSS Docker repo throwing 404

We are trying to set up a Docker repository in Nexus OSS (v3.3.2-02) in a Kubernetes cluster, and having issues logging in to it. We are intending to have a proxy set up for DockerHub, a private repo, and a group repo to tie the two together, using the below configurations

Hosted

Proxy enter image description here

Group enter image description here

giving us the following list:

enter image description here

But when I try to log in to the repository, it appears it's trying to forward me to a /v2 endpoint, which is throwing a 404 error:

> docker login -u <user> -p <pass> https://repo.myhost.com:443
Error response from daemon: login attempt to https://repo.myhost.com:443/v2/ failed with status: 404 Not Found

I would like to add that we have Maven and NPM repositories set up in this same instance and they're working, so it appears Nexus itself is OK, but there's something wrong with the Docker configuration.

I don't know why this request is trying to send me to the /v2 endpoint when trying to log in. What am I missing?

like image 789
TheIcemanCometh Avatar asked Jul 21 '17 19:07

TheIcemanCometh


People also ask

How do I log into my Nexus Docker registry?

Create a new Docker (hosted) repository and configure it like: Now, your private docker registry is configured where you can push the docker images. Now, to login to docker registry need to add docker bearer token in Nexus security -> Realm tab.

Does Nexus support Docker?

Nexus Repository supports Docker images and Helm 3 repositories with Proxy, Hosted, and Group repositories, allowing users advanced container management capabilities across development teams.


1 Answers

Docker requires very specific URL layout and does not allow for any context URL hence the need for Docker connectors to allow Docker client to connect to NXRM. Your screenshot shows you have configured Docker connector for your Docker hosted repository on port 444, but your terminal capture shows you're attempting to connect on port 443 which isn't your Docker connector port. The error message you have suggest your NXRM server indeed runs on port 443, but because of how Docker works you need to access it using port 444. Please try: docker login -u <user> -p <pass> https://repo.myhost.com:444 so it attempts to use your Docker connector port. Also, it's always a good idea to run the latest version of Nexus.

like image 155
Dawid Sawa Avatar answered Oct 09 '22 11:10

Dawid Sawa