1. Pull the imageThe version I installed here is 2.222.3-centos. You can get the version you need here: https://hub.docker.com/_/jenkins?tab=tags ocker pull jenkins/jenkins:2.222.3-centos 2. Create a local data volumeThe path I map the local data volume to is /data/jenkins_home/. You can modify it if you want to put it somewhere else. -p /data/jenkins_home/ The directory permissions need to be modified because when mapping the local data volume, the owner of the /data/jenkins_home/ directory is the root user, and the uid of the jenkins user in the container is 1000. -R 1000:1000 /data/jenkins_home/ 3. Create a containerdocker run -d --name jenkins -p 8040:8080 -p 50000:50000 -v /data/jenkins_home:/var/jenkins_home jenkins/jenkins:2.222.3-centos illustrate:
4. Configure Jenkins1. Open Jenkins Access http://192.168.1.106:8040/ (replace with your own IP and port) through the browser to enter the initial page. If Jenkins has not yet started, the following content will be displayed 2. Enter the administrator password Here you are required to enter the initial administrator password. According to the prompt, the password is in the file /var/jenkins_home/secrets/initialAdminPassword. Note that this path is in the Docker container, so we get it through the following command ker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword 85770376692448b7b6a8e301fb437848 Don't forget that we mapped the local data volume /data/jenkins_home/, so you can also output it with the following command ata/jenkins_home/secrets/initialAdminPassword 85770376692448b7b6a8e301fb437848 After entering your password, click Continue 3. Install plugins Select the recommended plugins to install here, and Jenkins will automatically start installing them. If the plugin installation is slow, please refer to Solve the problem of Jenkins plugin installation being slow (Linux) After the installation is complete, it will automatically jump to the next step 4. Create an administrator 5. Instance Configuration Just pay attention to the IP address and port 6. Configuration completed Notice: Reference: This is the end of this article about installing Jenkins with Docker. For more information about installing Jenkins with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue handwriting loading animation project
>>: Analysis and solution of a MySQL slow log monitoring false alarm problem
Table of contents Preface 1. What is scalability?...
To obtain the calculated style in a CSS element (t...
Table of contents MySQL query tree structure 1. A...
I have been using MySQL recently. The article mys...
Table of contents Preface Achieve results Code CS...
I will not introduce what CUDA is, but will direc...
Table of contents 1. MySQL wildcard fuzzy query (...
In this experiment, we configure MySQL standard a...
Since this is my first post, if there are any mis...
Preface Named slots are bound to elements using t...
Overview In a relational database, an index is a ...
MySQL 8.0.25 decompression version installation t...
This article shares the specific code of JS to ac...
The reason is that it was not uninstalled cleanly...
This article example shares the specific code of ...