运行:

docker run -d -e TZ="Asia/Shanghai"  -p 28080:8080 -p 50000:50000 --name jenkins -it --privileged=true  -v  /var/jenkins_home:/var/jenkins_home  jenkins/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?

问题分析:docker与jenkin默认目录(/var/jenkins_home)的权限问题
解决(最新版):

1.  groupadd jenkins
2.  useradd jenkins -g jenkins
3.  chown -R  jenkins:jenkins  /var/jenkins_home

输入完成之后 重新运行docker run命令
解决问题

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐