https://www.jenkins.io/
https://www.jenkins.io/download/
Jenkins Continuous Integration and Delivery server.
This is a fully functional Jenkins server, based on the weekly and LTS releases .
To use the latest LTS: docker pull jenkins/jenkins:lts
1. To use the latest weekly: docker pull jenkins/jenkins
Lighter alpine based image also available
2.查看jenkins 是否下载成功
docker images
3. 运行jenkins
创建文件夹
mkdir /home/jenkins
进入home:
查看文件权限
ls -nd jenkins/
chown -R 1000:1000 jenkins/ 给uid为1000的权限
docker run -itd -p 9090:8080 -p 50000:50000 –restart=always –name jenkins-test –privileged=true -v /home/jenkins:/var/jenkins_home jenkins/jenkins
4.查看jenkins是否启动:
ps -ef | grep jenkins
5. 登录
http://【IP】:9090/
在命令框输入命令查看登录密码:
cat /home/jenkins/secrets/initialAdminPassword
copy 密码,在浏览器输入登录,登陆成功。