How to setup Nexus OSS in order to use docker proxy credentials

Viewed 3237

I've purchased a Docker account and setup my Docker proxy using Nexus OSS as following :

Repositories -> Create a Docker Proxy -> Select Use Docker Hub (Remote Storage : https://registry-1.docker.io) -> with Authentication Enabled (providing username/password of Docker)

And inside my client I configured it to use my Nexus as registry mirror using following command :

systemctl edit docker

then added:

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --registery-mirror=https://myprivatenexus.com

Yet when I'm trying to use "docker pull" inside my client I'll get the annoying "Docker Hub Pull Limits" error.

Is it possible to use my Docker account inside Nexus or should I try something else?

enter image description here enter image description here

1 Answers

We used Nexus at work in a similar setting. Your nexus configuration looks like ours. For me the client mirror configuration looks strange. If I access a nexus repository without any configured connectors the I have to configure on client side the whole context path.

After your screenshot: https://YOUR_SERVER/repository/DockerHub

If you would connect a dedicated repository connector e.g. http/8088, then you could configure your client with

http://YOUR_SERVER:8088

The documentation from sonatype describes the same:

A configured context-path for the user interface does not affect the repository connector URLs used by Docker. E.g. if your repository manager instance is configured to be available at http://localhost:8081/nexus instead of the default root context http://localhost:8081/, the URLs for your Docker repositories will still only use the configured port for the repository and omit the context path in the URL. This is a side-effect of the the fact that Docker does not support context paths in the registry API.

Related