Working with Docker Toolbox and how to use the Jenkins Docker image from Docker Hub

Last updated on May 27 2022
Raigiri Patil

Table of Contents

Working with Docker Toolbox and how to use the Jenkins Docker image from Docker Hub

Working with Docker Toolbox

Let’s now check out how Docker Toolbox can be employed to work with Docker containers on Windows. The primary step is to launch the Docker Toolbox application for which the shortcut is created on the desktop when the installation of Docker toolbox is carried out.

Page 1 Image 1 68
docker terminal

Next, you’ll see the configuration being carried out when Docker toolbox is launched.

Page 1 Image 2 8
configuration

Once done, you’ll see Docker configured and launched. You’ll get an interactive shell for Docker.

Page 2 Image 3 33
interactive shell

To test that Docker runs properly, we can use the Docker run command to download and run a easy HelloWorld Docker container.

The working of the Docker run command is given below −

docker run

This command is employed to run a command in a Docker container.

Syntax

docker run image

Options

  • Image − This is the name of the image which is employed to run the container.

Return Value

The output will run the command in the desired container.

Example

sudo docker run hello-world

This command will download the hello-world image, if it is not already present, and run the hello-world as a container.

Output

When we run the above command, we will get the following result −

Page 3 Image 4 34
hello-world

If you want to run the Ubuntu OS on Windows, you can download the Ubuntu Image using the following command −

Docker run –it Ubuntu bash

Here you are telling Docker to run the command in the interactive mode via the –it option.

Page 3 Image 5 24
-it

In the output you can see that the Ubuntu image is downloaded and run and then you’ll be logged in as a root user in the Ubuntu container.

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 blog, we will see how to download and the use the Jenkins Docker image from Docker hub.

The official site for Docker hub is − https://www.docker.com/community-edition#/add_ons

Step 1 − Primary you need to do a easy sign-up on Docker hub.

Page 4 Image 6 18
docker hub

Step 2 − Once you have signed up, you’ll be logged into Docker Hub.

Page 4 Image 7 16
logged on

Step 3 − Next, let’s browse and find the Jenkins image.

Page 5 Image 8 16
jenkins image

Step 4 − If you scroll down on the same page, you can see the Docker pull command. This will be employed to download the Jenkins image onto the local Ubuntu server.

Page 5 Image 9 8
pull

Step 5 − Now, go to the Ubuntu server and run the following command −

sudo docker pull jenkins

Page 6 Image 10 7
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 employed to map the port number of the internal Docker image to our main Ubuntu server so that we can access the container accordingly.
Page 7 Image 11 5
docker run

You’ll then have Jenkins successfully running as a container on the Ubuntu machine.

So, this brings us to the end of blog. This Tecklearn ‘Working with Docker Toolbox and how to use the Jenkins Docker image from Docker Hub’ blog helps you with commonly asked questions if you are looking out for a job in DevOps. If you wish to learn Docker and build a career in DevOps domain, then check out our interactive, Containerization using Docker Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/containerization-using-docker/

Containerization using Docker Training

About the Course

Tecklearn has specially designed this Containerization using Docker Training Course to advance your skills for a successful career in this domain. his Docker training online course will help you learn Docker containerization, running Docker containers, Docker image creation, Dockerfile, Docker orchestration, security best practices and more through hands-on projects and case studies. Upon completion of this online training, you will hold a solid understanding and hands-on experience with Docker.

Why Should you take Containerization using Docker Training?

  • Average salary of Docker Expert is $110k – Indeed.com
  • According to Grand View Research, the DevOps market size is estimated to be worth $12.85 billion by 2025. DevOps professionals are highly paid and in-demand throughout industries including retail, eCommerce, finance, and technology.
  • Intuit, PayPal, Splunk, Uber & many other MNC’s worldwide use Docker across industries

What you will Learn in this Course?

Introduction to DevOps

  • What is Software Development
  • Software Development Life Cycle
  • Why DevOps?
  • What is DevOps?
  • DevOps Lifecycle
  • DevOps Tools
  • Benefits of DevOps
  • How DevOps is related to Agile Delivery
  • DevOps Implementation

Containerization using Docker – Part 1

  • Introduction to Docker
  • Understanding Docker Lifecycle
  • Docker Architecture
  • Components of Docker Ecosystem
  • Common Docker Operations
  • Committing changes in a Container
  • Hands On

Containerization using Docker – Part 2

  • Building Custom Docker Images
  • Docker Image
  • Introduction to Docker Swarm
  • Deploying a 2-Node Cluster using Docker Swarm
  • Hands on

 

0 responses on "Working with Docker Toolbox and how to use the Jenkins Docker image from Docker Hub"

Leave a Message

Your email address will not be published. Required fields are marked *