docker 安装最新的 jenkins
查看最新版本是多少
https://github.com/jenkinsci/docker
安装 jenkins
docker 拉取最新的 jenkins
docker pull jenkins/jenkins:2.452.3
拉取超时了,需要设置其他镜像源
vim /etc/docker/daemon.json
{
"registry-mirrors" :
[
"https://docker.m.daocloud.io",
"https://noohub.ru",
"https://huecker.io",
"https://dockerhub.timeweb.cloud"
]
}
// reload
systemctl daemon-reload
systemctl restart docker
运行容器
docker run \
-d \
-u root \
-p 6000:8080 \
-p 6001:50000 \
--name jenkins-docker \
-v /usr/bin/docker:/usr/bin/docker \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/jenkins_home:/var/jenkins_home \
-v /etc/localtime:/etc/localtime \
jenkins/jenkins:2.452.3