docker install jenkins

1. Download Mirror

docker pull jenkins/jenkins:lts

 

2. Run the boot image

docker run -d -p 8080:8080 -p 50000:50000 -v jenkins:/var/jenkins_home -v /etc/localtime:/etc/localtime --name jenkins docker.io/jenkins/jenkins:lts

-d background image

-p 8080: 8080 to 8080 mirrored port mapping to the server port 8080

-p 50000: 50000 to 50000 port mapping server mirroring to 50,000 ports

-v jenkins: / var / jenkins_home / var / jenkins_home directory jenkins working directory, we will mount a directory on your hard disk to this position, continue to use the original working directory to facilitate follow-up after the update image.

-v / etc / localtime: / etc / localtime let container and server use the same time settings.

--name jenkins container to an alias

 

3. Check the operating status

docker ps

 

4. Enter the ip address on the website: 8080 enters, this time need access password, the password into the container where the need to acquire docker exec jenkins tail / var / jenkins_home / secrets / initialAdminPassword

 

5. Select the recommended plug-ins can be installed, you can also choose to install their own needs

 

6. Create an account administrator

 

7. Start using

Guess you like

Origin www.cnblogs.com/peng-lan/p/11423242.html