docker 安裝最新的 jenkins

妖精代码發表於2024-07-13

檢視最新版本是多少

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

相關文章