Category: Docker, Jenkins, github

In this task we are going to create a setup integrating jenkins, docker, git and GitHub so that whenever the developer push a code to GitHub the code will automatically be download and deployed to server running in a container and if the code has some error it will send email notification regarding that. Create container image that’s has Jenkins installed using dockerfile First create a directory in redhat8 using command mkdir /task2 , edhat8 inside it create a Dockerfile using command gedit Dockerfile.

To unlock jenkins, run command docker exec jenkins_env cat /var/lib/jenkins/.jenkins/secrets/initialAdminPasswordthen it will outputs the password to unlock jenkins.

Now, when the developer will push his code to github repo, jenkins will automatically start and do the jobs.

Related Articles