`
sillycat
  • 浏览: 2543436 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Jenkins Backup and Restore from Docker to Host

 
阅读更多
Jenkins Backup and Restore from Docker to Host

Try to find the jenkins home directory from docker service
/home/ubuntu/work/sillycat-docker/centos7/centos7-jenkins-jdk10

Copy the home directory
> sudo cp -r jenkins_home ~/data/

Change the permission
> sudo chmod -R 777 jenkins_home

On the host machine, check java version
> java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

Download the war package
> wget http://ftp-chi.osuosl.org/pub/jenkins/war/2.161/jenkins.war

Here is the mapping for Docker before
0.0.0.0:50000->50000/tcp, 0.0.0.0:49000->8080/tcp

Command line parameters
https://wiki.jenkins.io/display/JENKINS/Starting+and+Accessing+Jenkins

Try the command like this in start.sh
#!/bin/sh

nohup java -Duser.home=/opt/jenkins/jenkins_home \
           -Duser.timezone=America/Chicago \
           -jar lib/jenkins.war \
           --httpPort=49009 > logs/jenkins.log 2>&1 &

References:
https://sillycat.iteye.com/blog/2436801
https://wiki.jenkins.io/display/JENKINS/Starting+and+Accessing+Jenkins

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics