How to start Jenkins Docker container with a given version

how-to-start-jenkins-docker-container-with-a-given-version

Jenkins is a widely used automation server that helps to streamline software development processes. Docker, on the other hand, is a popular tool for creating and managing containers. Running Jenkins in a Docker container can offer several benefits, such as easy deployment and portability. However, it’s important to make sure you’re using the right version of Jenkins to ensure compatibility with your existing tools and processes. In this guide, we’ll explore how to start a Jenkins Docker container with a specific version, ensuring you have the right tools for the job.

Use the following docker registry to pull docker image to start a Jenkins Docker image:
https://hub.docker.com/r/bitnami/jenkins

Following is the docker pull command to pull 2.346.3 version:

docker pull bitnami/jenkins:2.346.3

Once pull is completed we can start the Jenkins Docker container with the following command:

docker volume create --name jenkins_data
docker run -d -p 8080:8080 --name jenkins 
  --network jenkins-network 
  --volume jenkins_data:/bitnami/jenkins 
  bitnami/jenkins:2.346.3

Here I set the port mapping from 8080 to 8080. If you need to map to another port(ex 9000), use -p 9000:8080 option.

It take some time and you can see jenkins logs with docker logs command.

Then, open a browser and go to http://localhost:8080 and you will see Jenkins login page. User the following credentials to log into it:
Username: user
Password: bitnami

Total
0
Shares
Leave a Reply

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

Previous Post
my-favorite-free-courses-to-learn-docker-and-containers-in-2023

My Favorite Free Courses to Learn Docker and Containers in 2023

Next Post
3-productivity-saboteurs-and-what-to-do-about-them

3 Productivity Saboteurs and What To Do About Them

Related Posts