docker pull jenkins
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
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
Install recommended plug-ins
Or choose your own plugin to install.