Skip to content

yuryu/docker-jenkins-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-jenkins-demo

Running Jenkins and slaves on Docker

Build and run jenkins

$ cd jenkins
$ docker build -t yuryu/demo-jenkins .
$ docker run -d -v /var/lib/jenkins --name jenkins-home yuryu/demo-jenkins echo Data-only container for jenkins
$ docker run --volumes-from jenkins-home -d -p 8080:8080 yuryu/demo-jenkins 

Build slave image

$ cd slave
$ docker build -t yuryu/demo-jenkins-slave .

Backup and restore

Backup

# mkdir /tmp/backup
# chcon -Rt svirt_sandbox_file_t /tmp/backup
$ docker run --volumes-from jenkins-home -v /tmp/backup:/backup fedora tar cfz /backup/jenkins-home.tar.gz /var/lib/jenkins

Restore

# Restore
$ docker run --volumes-from jenkins-home -v /tmp/backup:/backup fedora tar xf /backup/jenkins-home.tar.gz -C /

About

Running Jenkins and slaves on Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages