docker.build jenkins docker pipeline code example

Example 1: docker run jenkins

docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

Example 2: jenkins pipeline

Pipeline is a set of processes that take 
the code from version control and compile,
build, test and deploy to
production in automated fashion.
• The pipeline breaks down the software
delivery process into stages.
Each stage is made of different tasks
which can be carried out in parallel. 
When all tasks in a stage passes, next stage is triggered