Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy and install jenkins for docker

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to deploy and install jenkins in docker. It is very detailed and has a certain reference value. Friends who are interested must read it!

First, we need a server with docker installed. (I have installed this on my small mainframe.)

The first step is to pull the image to docker pull jenkins/jenkins:lts.

The second step is to create a mapping directory # create a mapping directory in the appropriate location mkdir-p jenkins_home# view directory permissions ls-nd jenkins_home# change the owner to administrator sudo chown-R 1000 nd jenkins_home# 1000 jenkins_home

Step 3: start jenkins# to view the mirror docker images of docker

# launch Jenkinsdocker run-d-p 12580 my_data/jenkins_home/:/var/jenkins_home jenkins/jenkins:lts 8080-- name=jenkins-v / step 4, open the jenkins web page

Then we need to go into the container and check the password.

# View container list sudo docker ps

Then enter the container according to container ID

Sudo docker exec-it 8c6be63a8fd5 / bin/sh

And get the password.

Cat / var/jenkins_home/secrets/initialAdminPassword

Then fill in the password in the web page above.

Then an error may be reported: prompt that the cloudbees-folder plug-in is missing

The solution is to go to Index of / packages/jenkins/plugins/cloudbees-folder/latest

After downloading, put it in the war/WEB-INF/detached-plugins under the jenkins_home folder, and then restart the container.

Next, install the recommended plug-ins

Then create these actions for the administrator user, and the Jenkins installation is complete!

These are all the contents of the article "how to deploy and install jenkins in docker". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 237

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report