Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

Install Jenkins as Docker Container

Spread the Knowledge

In the Previous Post we Learned How to install Jenkins as Servlet on Tomcat server.

In this post we will try even simple and easy way to run Jenkins on your machine using docker.

Like all major servers Jenkins also comes as a light weight container and is being maintained by community aggressively.

Pre-requisites :
1. Basic docker understanding.
2. Docker should be up and running on the host machine.
If you feel you need refresher for any of the above – try searching it on – we have plenty of content available 🙂

Let’s start, first check docker daemon is running on the machine where you want to install Jenkins as container.

For me, I’m going to do it on my mac machine locally – steps would be pretty much similar if we want to do it on cloud machine as well.


docker version

It should some like below on screen :

docker version

Run docker command :

docker run -p 8080:8080 -d jenkins

Let me explain what we did above , we are asking docker to run Jenkins container on port 8080 for the localhost host machine which will be routing traffic to port 8080 to the Jenkins container and -d tag tells to run this container in detached mode.

If we don’t have the Jenkins container image locally, docker will go and download it from the docker hub registry. You will see something like this below as out put.

running Jenkins container

Now goto http://localhost:8080

Jenkins home page

Now a big question how to find out admin password ??? as the password would be in container and not in local host machine, we should get it from there.

Run below command :

docker exec <containerID> cat /var/jenkins_home/secrets/initialAdminPassword

This will print out the admin password on screen, something like this:

Note, as container ID gets generated on the run time. It would be different for you and me.

Lets copy this password and enter it on the jenkins dashboard :

If you are seeing dashboard like above – congratulations you have successfully installed Jenkins as docker container pat your back and start using it.

More on Jenkins in the upcoming lectures. If you like this article feel free to check other articles by me.

Gaurav Bajpai