Docker运行Jenkins的正确方法(持续更新)

初始化运行

docker run jenkins

生产环境运行
docker run --name jenkins -v /mnt/db1/jenkins/jenkins_home:/var/jenkins_home -v /root/.ssh/id_rsa:/root/.ssh/id_rsa:ro -v /root/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:ro -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /mnt/db1/jenkins/.m2:/root/.m2 -v /mnt/db1/jenkins/maven:/usr/local/maven -v /mnt/db1/jenkins/share:/usr/share/jenkins -u root --restart always --network right-service --ip 172.18.0.4 --privileged=true -d jenkins/jenkins:lts

相关推荐