Proxy Repository for Docker Unable to pull images - Sonatype Nexus Repository - Sonatype Community

Proxy Repository for Docker Unable to pull images

post by gautier.franchini on Aug 6, 2024

Dear Community members, I currently evaluating nexus repository manager to be use instead of JFrog Artifactory (Pro); I’m currently on the “remote repository” part.

I manage to setup a couple of APT remote repositires, now I’m struggling to set the dockerhub proxy remote repository

here are some documentation url I followed:

Here is what I have so far:

$ curl -I https://nexuslab.domain.eu/
    HTTP/1.1 200 OK
$ curl -I https://nexuslab.domain.eu/repository/docker-remote/v2/ -u svc-nexus-api
Enter host password for user 'svc-nexus-api':
    HTTP/1.1 200 OK
- from a another server (running docker):
 curl -I https://nexuslab.domain.eu/repository/docker-remote/v2/ -u svc-nexus-api
Enter host password for user 'svc-nexus-api':
HTTP/1.1 200 OK

$ docker login nexuslab.domain.eu/repository/docker-remote/v2/
Username: svc-nexus-api
Password:
Error response from daemon: login attempt to https://nexuslab.domain.eu/v2/ failed with status: 404 Not Found
Error response from daemon: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "
<!DOCTYPE html>
<html lang=\"en\">
<head>
  <title>404 - Sonatype Nexus Repository</title>
. . .
<div class=\"nexus-body\">
  <div class=\"content-header\">
    <img src=\"../../../../static/rapture/resources/icons/x32/exclamation.png?3.59.0-01\" alt=\"Exclamation point\" aria-role=\"presentation\"/>
    <span class=\"title\">Error 404</span>
    <span class=\"description\">Not Found</span>
. . .


nexus3-ui-docker-hub-00001852×1051 65 KB](https://cx-discourse-user-uploads.s3.dualstack.us-east-1.amazonaws.com/original/2X/a/a4422b9c758539640a6e37d83682750897c94db7.png "nexus3-ui-docker-hub-00001")

( due to the restrictions in place, please find other screens caputres in replies below)

ubuntuadmin@dokcerlab:~$  curl -I https://nexuslab.domain.eu/
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 05 Aug 2024 08:27:02 GMT
Content-Type: text/html
Content-Length: 7927
Connection: keep-alive
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Last-Modified: Mon, 05 Aug 2024 08:27:02 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0
Expires: 0
{
  "registry-mirrors": [ "https://nexuslab.domain.eu" ],
}
{
        "auths": {
                "artifactorylab.my.domain.lu": {
                        "auth": "<mysupertokenvaluehere>=="
                }
        }
}

I obviously setup something wrong

Can you point me to the good direction ?

Thanks in advance for your time and help.

kr,