下载最新Jenkins
docker pull jenkins/jenkins:lts
运行jenkins
docker run --name jenkins -p 8080:8080 -p 50000:50000 -v /opt/repository/:/opt/repository/ -v jenkins_home:/home/jenkins/jenkins-data --restart always -d jenkins/jenkins:lts
获取jenkins初始密码 访问jenkins
注意如果云服务器请先去云服务器放行端口 在放行宝塔端口
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
网友评论