How to start Jenkins Docker container with a given version

Valentsea
Total
0
Shares

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
Enter fullscreen mode

Exit fullscreen mode

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
Enter fullscreen mode

Exit fullscreen mode

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
Valentsea

How Do You Land Your First Job in Tech?

Are you a new coder looking to break into the tech industry? It can feel discouraging and isolating…

You May Also Like