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
posted @ 2024-07-13 11:06  妖精代码  阅读(48)  评论(0编辑  收藏  举报