docker安装jekins

环境: win10

1. 安装jekins

docker run -itd -p 8080:8080 -p 50000:50000  -v e:/docker/jenkins/jenkins_data:/var/jenkins_home --name jenkins --restart=always jenkinsci/blueocean

2. 更换镜像

docker logs -f jenkins

替换镜像
vi e:/docker/jenkins/jenkins_data/hudson.model.UpdateCenter.xml
替换掉



  
    default
    https://mirrors.tuna.tsinghua.edu.cn/jenkins/
  

参考文章
+ https://blog.csdn.net/dieorlife/article/details/100222152
+ https://www.cnblogs.com/dgwblog/p/12595702.html

3. 重启容器

docker restart id

4. 浏览器打开127.0.0.1:8080

查看密码: cat e:/docker/jenkins/jenkins_data/secrets/initialAdminPassword
或者进入容器,查看密码: cat /var/jenkins_home/secrets/initialAdminPassword

你可能感兴趣的:(环境搭建,docker)