In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to deploy Jenkins in Docker". In daily operation, I believe many people have doubts about how to deploy Jenkins in Docker. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to deploy Jenkins in Docker"! Next, please follow the editor to study!
Installation and configuration of Jenkins
For installation in Docker environment, download the Docker image of Jenkins:
Docker pull jenkins/jenkins:lts runs Jenkinsdocker run-p 8080 root 8080-p 50000 name jenkins in the Docker container-name jenkins\-u root\-v / etc/localtime:/etc/localtime\-v / data/jenkins_home:/var/jenkins_home\-e Java_OPTS=-Duser.timezone=Asia/Shanghai\-d jenkins/jenkins:ltsecho 'Asia/Shanghai' > / etc/timezone
Configuration of Jenkins
Log in to Jenkins by visiting this address after running successfully. Enter the administrator password for the first login: http://localhost:8080/
To log in with an administrator password, you can obtain the administrative password from the container startup log using the following command:
Docker logs jenkins
Choose to install the plug-in. Here we install the recommended plug-in directly:
Enter the plug-in installation interface and wait for the plug-in to be installed online:
After the installation is complete, create an administrator account:
Configure the instance to configure the URL of Jenkins:
Click system Management-> plug-in Management to install some custom plug-ins:
Ensure that the following plug-ins are installed correctly:
Plug-in for managing permissions based on role: Role-based Authorization Strategy
Plug-in for remote use of ssh: SSH plugin
Configure global tools through system Administration-> Global tool configuration, such as maven configuration:
Docker deployment Jenkins getting started tutorial Docker deployment Jenkins getting started tutorial
Add the installation configuration of maven:
Add the global ssh configuration to system Administration-> system configuration so that Jenkins can execute remote linux scripts using ssh:
Role rights management
We can use the role management plug-in of Jenkins to manage Jenkins users. For example, we can give all permissions to administrators, operation and maintenance staff to execute tasks, and other personnel only to view.
Enable role-based rights management in system Administration-> Global Security configuration:
Enter the system Management-> Manage and Assign Roles interface:
Add the relationship between roles and permissions:
Assign roles to users:
At this point, the study on "how to deploy Jenkins in Docker" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.