Centos8 system installed under the docker jenkins

The premise is already installed docker

1. Download jenkins

docker pull jenkins

2. Create a folder for storing jenkins

mkdir /home/var/jenkins

3.cd enter / home / var / directory, set up a home subscriber jenkins folder UID 1000

chown -R 1000:1000 jenkins/

4. Start jenkis

sudo docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /home/var/jenkins:/var/jenkins_home jenkins

 

Three, Jenkins use initialization

1, get initialized administrator password: Type in your browser http: // server IP: 8080 Open jenkins, first open the password required to obtain administrator, as:

 

Open File command to obtain the password:

Jenkins CAT Docker Exec the sudo / var / jenkins_home / Secrets / initialAdminPassword
2, plug installation: enter the password submitted after the completion plug installation will jump to the page, and then select the first installation, as shown:

 

 

3, create an administrator, then submit the information as shown fill Administrator

To this end of the installation.

Guess you like

Origin www.cnblogs.com/xiaokangk/p/12154826.html