I'm trying to create a local docker private registry. I am following the documentation.
For this purpose I have created the following docker-compose.yaml file in order to deploy the Nexus web UI (8081) and expose 5000
port for docker private repository.
version: '3'
services:
nexus:
image: sonatype/nexus3:3.41.1
container_name: nexus3
ports:
- 8081:8081
- 5000:5000
After the container status was OK, I have created a docker-hosted
repository using Nexus UI.
After the above step, I created a new user with the following configurations:
The problem is that whenever I want to login to the local private docker repository using the docker login localhost:5000
command and pass the username and password of the created user, I face to the following error:
docker login localhost:5000
Username: nexus
Password: nexus
Error response from daemon: login attempt to http://localhost:5000/v2/ failed with status: 401 Unauthorized