1. Install Docker on CentOS7
yum update
yum install docker
docker version
systemctl start docker.service
systemctl enable docker.service
docker pull jenkins
docker images jenkins
2. Install Docker on CentOS7
docker run --name myjenkins -p 8080:8080 -v /var/jenkins_home jenkins
docker run -i -t -p 8080:8080 jenkins /bin/bash
- Start the jenkins:
java -jar /usr/share/jenkins/jenkins.war &
- Generate the key:
ssh-keygen -t rsa -C jenkins-docker
- Configure the key in the Github:
- Configure the key in the Jenkins
- Create the free style job
3. Configure the mail notification
Refer to:
http://www.cnblogs.com/zz0412/p/jenkins02.html
20170320-Jenkins-Docker to Deploy
原文:http://www.cnblogs.com/XilingCai/p/6590307.html