给jenkins挂载目录更改用户为1000(jenkins的内置用户,否则会报启动权限错误)
给maven仓库目录更改用户为1000
chown -R 1000 /usr/local/docker/jenkins(jenkins挂载目录)
chown -R 1000 /usr/local/maven/repository(maven仓库位置)
docker run --privileged=true -d --restart=always --name jenkins -p 8080:8080 -p 50000:50000 -v /usr/local/docker/jenkins:/var/jenkins_home -v /usr/local/maven/:/usr/local/maven -v /usr/local/jdk1.8.0_131/:/usr/local/jdk jenkins
网友评论