Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Jenkins Tutorials: Install Jenkins as Docker Container

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 devopsschool.com – 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.

Run,

docker version

It should some like below on screen :

docker version

Run docker command :

docker run -p 8080:8080 -d jenkinsCode language: CSS (css)

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/initialAdminPasswordCode language: HTML, XML (xml)

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

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in offers unparalleled convenience and affordability in bike rentals, allowing users to enjoy hassle-free rides for commuting, exploring, or leisure trips. With a wide range of bikes and scooters, it’s your trusted partner for all two-wheeler needs.

Related Posts

Automating Jenkins Job Configuration: Job DSL, Multibranch, Job Generator, and JJB

Manually creating many Jenkins jobs is slow and error-prone. This guide compares the main automation options and shows practical jobs-as-code examples for repeatable setup.

Read More

Docker Training Agenda: A Hands-On Learning Path from Containers to Registries and Networking

This revised Docker training agenda turns the original outline into a practical, modern learning path for beginners and early-career DevOps engineers. It maps each module to hands-on outcomes, core commands, and common implementation decisions.

Read More

Install Jenkins with Docker: Persistent Setup, Port Mapping, and Logs

Learn how to run Jenkins in Docker with correct port mapping, persistent storage, and operational commands. This updated guide keeps the original workflow but adds modern, production-minded practices.

Read More

Jenkins at Scale: Practical References and Admin Cheatsheet

This revised guide upgrades a short 2015 Jenkins link post into an operations-ready reference for teams running Jenkins at scale. It preserves the original links and adds a workflow diagram, comparison table, and practical API/CLI examples.

Read More

Jenkins Backup and Restore Runbook: ThinBackup, Filesystem Archives, and Recovery Steps

A practical Jenkins backup and restore guide for DevOps teams, covering what to back up, strategy trade-offs, and step-by-step command examples. Includes a workflow diagram and a recovery checklist you can operationalize.

Read More