Upgrade the Jenkins running in a Docker container
If you are using Docker for running Jenkins CI server chances are you will get messages such as a "New version of Jenkins is available for download"
Now if you want to upgrade your Jenkins server follow the steps below:
1. Login to your jenkins container
docker container exec -u 0 -it jenkins bash
2. Change the directory to jenkins folder
cd /usr/share/jenkins
3. Take a backup of your old jenkins.war file
mv jenkins.war jenkins.war_bak
4. Download the latest version of jenkins
wget http://updates.jenkins-ci.org/download/war/2.164.3/jenkins.war
5. Change permission of the file
chown jenkins:jenkins jenkins.war
6. Exit the container and restart it
exit
docker container restart jenkins
Comments