I try to push a docker image to my private Nexus 3 registry.
Before to push, i try to authenticate doing : docker login nexus_host:nexus_port
But i got the following error message :
Error response from daemon: login attempt to http://nexus_host:nexus_port/v2/ failed with status: 404 Not Found
My Nexus use HTTP, so add it in docker insecure registries list.
EDIT (08/03/2018) :
I use a hosted docker repository. Should i use a HTTP connector ?
Repo Configuration :
Format : docker
Type : hosted
URL : http://192.168.0.90:8082/repository/docker-repo/
HTTP connector port : 1111
Login attempts :
docker login 192.168.0.90:8082
=> Error response from daemon: login attempt to http://192.168.0.90:8082/v2/ failed with status: 404 Not Found
docker login 192.168.0.90:1111
=> Error response from daemon: Get https://192.168.0.90:1111/v2/: dial tcp 192.168.0.90:1111: getsockopt: connection refused
The correct command to login into your docker repository is docker login 192.168.0.90:1111
, because you've enabled HTTP connector on port 1111
.
Please make sure that you have checked Force basic authentication in your docker repository settings and for docker login
use the same credentials as you do to access your instance of Nexus Repository Manager.
If the above doesn't help, then you should focus on what's causing the connection to be refused - please check if there are any firewalls between you and the Nexus blocking port 1111
(your docker repository connector port).