Table of contents
💎Use your Docker Build and Run Knowledge
docker build - you can use sh 'docker build . -t <tag>'
in your pipeline stage block to run the docker build command. (Make sure you have docker installed with correct permissions.
docker run: you can use sh 'docker run -d <image>'
in your pipeline stage block to build the container.
How will the stages look
stages {
stage('Build') {
steps {
sh 'docker build -t trainwithshubham/django-app:latest'
}
}
}
💎Task-01
Create a docker-integrated Jenkins declarative pipeline
Use the above-given syntax using
sh
inside the stage block
- Create a new job, select pipeline project.
- Under Source Code Management, select Git and Added the repository URL.
- Within the Jenkins job's Pipeline build step, Write declarative pipeline script.
- Save and click on Build Now.
- You can check your logs in Console Output.
📚Happy Learning :)
JenkinsPipeline#90daysofdevops#90daysofdevops chanllenge#90daysofdevopschallengeTrainWithShubham#trainwithshubham #90daysofdevopschallenge #Linux #OpenSource #Technology #OperatingSystem #90daysdevops #devopscommunity #devopsfodnahai #hiring #immediatejoiners #devopsengineer #cloudcomputing #cloudtechnology #continuousintegration #continuousdelivery #TerraWeek #community #twsstudentscholarship #developertools #linkedin #linuxcommands #shellscripting #scripting #awscommunity #awscommunityday 😉 #aws