UrbanPro
true

Learn DevOps Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Use Nexus as Docker Registry

Raghu K
28/03/2018 0 0

There are different tools provides docker registry, and in this tutorial, we want to use Sonatype Nexus Repository Manager as our docker registry, and we will upload our images in there.

I am using the CentOS7 server in google cloud to install Nexus. You may need to change the script based on your requirements. Also as a pre-requisite this script needs SELinux and FIREWALL need to be disabled, In case if you want to run along with those, then you need to modify the scripts as the requirement.

1. Install Nexus Repository.

Run the following command to install Sonatype Nexus Repository Manager, and it starts the service automatically.

Note: Ensure you run the script as root user.

# curl -s https://raw.githubusercontent.com/linuxautomations/nexus/master/install.sh | bash

You can view the output as follows.

image

2. Open the repository over browser with 8081 default port of Nexus.

You can view the web portal of Nexus as follows.

image

3. Next, navigate as follows and create the repository.

Sign In -> Username & Password (Default username & password : admin / admin123 )

Then click on Settings as shown in the below image.

image

Then click on Repositories in the left pane and then click on create the repository and then select docker (hosted).

And fill in the details as follows.

image

Finally, Click on Create repository.

Then the created repository will be shown as below.

image

4. Let's try to login to nexus repository from docker node.

Add the following configuration to docker.

# cat /etc/docker/daemon.json
{
"insecure-registries" : ["nexus:9001"]
}
# systemctl restart docker
#
You might be execpected the following output.

image

5. Finally, create an image and push to nexus repo and verify the repository.

# docker tag centos nexus:9001/centos
# docker push nexus:9001/centos
The push refers to a repository [nexus:9001/centos]
e15afa4858b6: Pushed
latest: digest: sha256:7e94d6055269edb455bcfb637292573117e4a8341e9b9abbc09b17d8aafe8fbe size: 529

image

Hurray. Enjoy :)

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

DevOps Git
Removing a file from git staging (index) area. Assume git add sample file => for adding the file to git staging area. Check the git status command Use git rm for removing the content from working...

How to install Apache HTTP in Linux OS
sudo bash // for becoming super user // now left hand side you can see root yum update // for updates yum install httpd // for installing httpd software service httpd start // for starting httpd software Once...

How to install Apache HTTP in Linux OS
sudo bash // for becoming super user // now left hand side you can see root yum update // for updates yum install httpd // for installing httpd software service httpd start // for starting httpd software Once...

DevOps Training Course
DevOps Syllabus: DevOps Essentials: What is DevOps? Why DevOps? Evolution of Software Methodologies Dev Challenges v/s DevOps Solution Ops Challenges v/s DevOps Solution Stages Of DevOps Lifecycle...

Practicing Chef with out installing on your server
Hi Students, Go to the following webiste and create your free account. https://manage.chef.io/login You can practice on your won without having to install Chef for DevOps practice. Create AWS instances...
X

Looking for DevOps Training Classes?

The best tutors for DevOps Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn DevOps Training with the Best Tutors

The best Tutors for DevOps Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more