docker-compose build
Several ways to proceed from here. You can use
docker-compose up -d
docker exec -it jenkins_test cat /var/jenkins_home/secrets/initialAdminPassword
Open master
docker-compose run -d slave -url http://192.168.99.100:8080 06647f7ff6fa31688663191eb7e62347c4b76b5a4f9a59c11a2edb3ad2e35899 slave1
where 06647f7ff6fa31688663191eb7e62347c4b76b5a4f9a59c11a2edb3ad2e35899
is secret and slave name slave1
you get from master jenkins when you create slave node.
To backup the data from the volume container is simple to. Simply run:
docker cp jenkins-dv:/var/jenkins_home /tmp/jenkins-backup
Java 1.8
docker run -p 8080:8080 --name=jenkins-master -d --env JAVA_OPTS="-Xmx8192m" jenkins
Java 1.7
docker run -p 8080:8080 --name=jenkins-master -d --env JAVA_OPTS=”-Xmx8192m -XX:PermSize=256m -XX:MaxPermSize=1024m” jenkins
Official Jenkins master image Official Jenkins image repo Jenkins setup example 1 Putting Jenkins in a Docker Container Cloudbees Jenkins slave image