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 install Jenkins in Docker

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article introduces you how to install Jenkins in Docker, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Installation

Mkdir / opt/app/jenkins

Docker pull jenkins

Chown-R 1000 1000 / opt/app/jenkins (give uid a permission of 1000, otherwise there will be a permission problem)

Docker run-d-- name compose_jenkins_1-p 9090 opt/app/jenkins:/var/jenkins_home jenkins:latest 8080-p 50000-v / opt/app/jenkins:/var/jenkins_home jenkins:latest

Problems encountered in installation

Cause analysis:

We look at the "/ var/jenkins_home" directory permission of jenkins. The current user of the Jenkins container is "jenkins" and the "/ var/jenkins_home" directory is owned by the jenkins user, while the directory permission of the / opt/app/jenkins we just created is root. When the local data volume is mapped, the owner of the / var/jenkins_home directory becomes the root user.

Docker run-ti-- rm-- entrypoint= "/ bin/bash" jenkins:latest-c "whoami & & id"

So the solution is: chown-R 1000VR 1000 / opt/app/jenkins

Use

Login address: http:xxxx:9090/

Find the initial password: cat / opt/app/jenkins/secrets/initialAdminPassword

Select the recommended plug-in to install.

On how to install Jenkins in Docker to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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: 0

*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

Internet Technology

Wechat

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

12
Report