Docker runs jenkins

  jenkins

Pull mirror

docker pull jenkins

run

In order to facilitate the installation of plug-ins, jenkins_home directory is mapped out

docker run -p 8080:8080 -p 50000:50000 -v /home/docker/jenkins:/var/jenkins_home jenkins

Error reporting:

touch: cannot touch ‘/var/jenkins_home/copy_reference_file.log’: Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?

The following directory permissions need to be modified because when mapping the local data volume, the owner of the/home/doc/Jenkins directory is root and the uid of jenkins user in the container is 1000

sudo chown -R 1000:1000 /home/docker/jenkins

Initialization

http://192.168.99.100:8080/
图片描述

Install recommended plug-ins
图片描述

Or choose your own plugin to install.
图片描述

Enter jenkins
图片描述

doc