SoFunction
Updated on 2025-03-09

Docker installation Jenkins (fool-style installation)

Step 1: Pull the image (using lts version, here is the latest lts version)

It is best to use the latest lts version because the plugin may be incompatible with the lower version

docker pull jenkins/jenkins:2.361.1

Step 2: Create the mount directory

mkdir -p /usr/local/jenkins_home

Step 3: Authorization

chown -R 1000 /usr/local/jenkins_home/ 

Step 4: Run the container

docker run -di --name=jenkins -p 8080:8080 -v /usr/local/jenkins_home:/var/jenkins_home jenkins/jenkins:2.361.1
  • -v /var/run/:/var/run/ Use this command, when docker is run inside the jenkins container, the docker client will communicate with docker deamon on the host to run the new container.

Step 5: View Password

docker logs jenkins 

This is the end of this article about Docker installation Jenkins (fool-style installation). For more related docker installation Jenkins content, please search for my previous articles or continue browsing the following related articles. I hope everyone will support me in the future!