LuoSong
LuoSong
Published on 2024-04-30 / 83 Visits
0
0

Docker中Jenkins升级

Docker中Jenkins升级

在Jenkins挂载目录下下载最新的Jenkins.war

https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/2.455/jenkins.war

使用Docker命令进入Jenkins容器(-u root确保文件操作时的权限)

docker exec -it -u root 06538782f87e /bin/bash

进入目录

cd /usr/share/jenkins

备份

mv jenkins.war jenkins.war.bak

复制新的war包

cp /var/jenkins_home/jenkins.war ./

重启Jenkins容器

docker restart 06538782f87e


Comment