Hi,
I’m having trouble getting Nexus Docker Hub proxy to work. I have successfully created proxies in Nexus previously for apt, yum and pypi repositories without any difficulty but am struggling with this one. My Nexus instance runs on a dedicated server VM on port 8083. I have configured the docker-hub proxy using the Nexus web GUI exactly as per ‘minimal’ guidance in Proxy Repository for Docker and called it docker-hub-proxy. This creates a proxy which I can see in Nexus with address http://<MY_NEXUS_SERVER>:8083/repository/docker-hub-proxy/ and which is shown as ‘online’. I left all other configuration options not mentioned in Proxy Repository for Docker to their default values (haven’t configured any connectors etc.).
On my client host I have then added in /etc/docker/daemon.json an insecure-registries and registry-mirrors entry
{
"insecure-registries": ["<MY_NEXUS_SERVER>:8083"],
"registry-mirrors": ["http://<MY_NEXUS_SERVER>:8083"]
}
and restarted the docker daemon after which I can see the entries have been created for insecure-registries and registry-mirrors when I run docker info
on the client machine.
I then try and run e.g.,
docker pull <MY_NEXUS_SERVER>:8083/hello-world
but it doesn’t succeed.
Running sudo journalctl -fu docker
whilst doing this I can see that the client docker daemon first tries to pull the image from https::<MY_NEXUS_SERVER>:8083, which fails with error message ‘http: server gave HTTP response to HTTPS client’. It then tries to pull from http::<MY_NEXUS_SERVER>:8083, but then just hangs.
I’d really appreciate some help. I am running Sonatype Nexus Repository COMMUNITY 3.78.1-02 (using the Docker image provided by Sonatype) on an Ubuntu 22.04 VM and an Ubuntu 22.04 docker client.