Saturday 29 December 2018

How to configure Nexus as Docker Trusted Repository

In this tutorial we will  cover how to configure Nexus as Docker repository.
We are assuming you have already installed and configured Nexus Repository manager. If not please follow Nexus Repository Manager installation.

1) Please login to Nexus Repository Manager.

2) Click on Repositories and select docker ( hosted )

3) Please Name your Private docker hub repository and update all configurations as mentioned below and click on create repository.


4) Enable Docker Bearer token Realm in Nexus.


5) Please try to authenticate yourself to newly created docker repository by providing nexus credentials.

docker login http://{hostname}:{httpport}

6) If you are using http protocol to login to Docker Registry then please add below line to /etc/docker/daemon.json and restart docker service. 
{ "insecure-registries":["192.168.56.101:5000"] }

Once the authentication is success you are good to proceed with pushing docker image to this private docker repository. 


Note: Make sure your docker image name should be in {hostname}:{httpport}/{image_name}:{image_tag} to push to this repo. You can also configure DNS name for this repo to improve readability.





No comments:

Post a Comment