- Install Git
- Isntall Java
- Install Docker
- Install Jenkins
yum install git -y
yum install java -y
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkins -y
service jenkins start
yum install docker -y
usermod -aG docker jenkins
service docker start
service jenkins restart
Clone code from github
git clone https://github.com/cloudtechmasters/jenkins-docker-slave.git
cd jenkins-docker-slave
docker build -t cloudtechmasters/jenkins-slave .
Push Jenkins-slave Image to docker hub
docker login
docker push cloudtechmasters/jenkins-slave:latest
- docker
- docker pipeline
Goto Jenkins --> Manage Jenkins --> configure system --> Cloud Click on a separate configuration page and click on docker
Fill details as show above images and click on Save
Paste content of Jenkins file with pipeline section