/    /  Docker – Hub

Docker Hub

 

It’s a cloud registry where you can download Docker images built by other communities. You can also upload your own Docker images. Here’s how to download and use the Jenkins Docker image.

Docker Hub can be found at https://hub.docker.com/https://hub.docker.com/

Step 1 − Sign up on Docker Hub first.

h1

Step 2 − You’ll be logged into Docker Hub once you sign up.

h2

Step 3 − We’ll browse and find the Jenkins image. Let’s select one.

h3

Step 4 − On the same page, you’ll find the Docker pull command. This will download the Jenkins image to your Ubuntu box.

h4

Step 5 − Run the following command on the Ubuntu server

$ sudo docker pull jenkins/jenkins

h5

Run the following command to run Jenkins

$ sudo docker run -p 8080:8080 -p 50000:50000 jenkins 

Please note the following points about the sudo command above:

  • To ensure root access, we use the sudo command.
  • jenkins/jenkins is the image we want to download from Docker hub and install on Ubuntu.
  • We use -p to map the Docker image’s port number to our main Ubuntu server so we can access the container.

You’ll now have Jenkins running on Ubuntu as a container.