- Docker - Working of Kubernetes
- Docker - Kubernetes Architecture
- Docker - Continuous Integration
- Docker - Compose
- Docker - Logging
- Docker - Cloud
- Docker - Setting ASP.Net
- Docker - Toolbox
- Docker - Setting NGINX
- Docker - Setting MongoDB
- Docker - Setting Node.js
- Docker - Networking
- Docker - Storage
- Docker - Container Linking
- Docker - Instruction Commands
- Building a Web Server Docker File
- Docker - Private Registries
- Docker - Managing Ports
- Docker - Public Repositories
- Docker - Building Files
- Docker - File
- Docker - Containers & Shells
- Docker - Configuring
- Docker - Container & Hosts
- Docker - Architecture
- Docker - Working With Containers
- Docker - Containers
- Docker - Images
- Docker - Hub
- Docker - Installation
- Docker - Installing Docker on Linux
- Docker - Overview
- Docker - Home
Docker Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Docker - Hub
Docker Hub is a registry service on the cloud that allows you to download Docker images that are built by other communities. You can also upload your own Docker built images to Docker hub. In this chapter, we will see how to download and the use the Jenkins Docker image from Docker hub.
The official site for Docker hub is −
Step 1 − First you need to do a simple sign-up on Docker hub.
Step 2 − Once you have signed up, you will be logged into Docker Hub.
Step 3 − Next, let’s browse and find the Jenkins image.
Step 4 − If you scroll down on the same page, you can see the Docker pull command. This will be used to download the Jenkins image onto the local Ubuntu server.
Step 5 − Now, go to the Ubuntu server and run the following command −
sudo docker pull jenkins
To run Jenkins, you need to run the following command −
sudo docker run -p 8080:8080 -p 50000:50000 jenkins
Note the following points about the above sudo command −
We are using the sudo command to ensure it runs with root access.
Here, jenkins is the name of the image we want to download from Docker hub and install on our Ubuntu machine.
-p is used to map the port number of the internal Docker image to our main Ubuntu server so that we can access the container accordingly.
You will then have Jenkins successfully running as a container on the Ubuntu machine.
Advertisements