docker部署jenkins环境

首先获取jenkins的镜像:

1 docker pull jenkins

设置jenkins_home映射:

sudo mkidr -p /jenkins_home

sudo chmod -R 777 /jenkins_home

启动容器:

➜  ~ docker run -it -d --restart always --name jenkins -p 8080:8080 -p 50000:50000 -v /jenkins_home:/var/jenkins_home jenkins

在浏览器中访问:http://127.0.0.1:8080/

初始密码在:/jenkins_home/secrets/initialAdminPassword中

参考:

https://hub.docker.com/_/jenkins/

https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions

posted @ 2017-10-19 13:59  veitch-w  阅读(625)  评论(0编辑  收藏  举报