From the course: Intermediate Jenkins: Automate, Integrate, and Secure CI/CD Workflows at Scale

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Solution: Improve a Docker agent pipeline

Solution: Improve a Docker agent pipeline

Ah yes, it's the perfect time for another challenge. In this challenge, we need to set up our Jenkins controller to run a Docker pipeline. Once everything is in place for Docker, we're being asked to update the pipeline to use multiple stages for better debugging. I'm starting in the terminal on my Jenkins server to make sure Docker is installed. First I'll become the Jenkins user. I need to make sure I run the docker ps command as the Jenkins user to confirm that the server process will be able to download and run images for docker agents. So I'll run docker ps. Ok, no problems there so everything looks good. Next I needed to install a docker plugin. Installing the main docker plugin brings along a couple of other plugins as well. Once these are in place, I needed to create and configure a cloud. The Docker Cloud configuration manages the way the Jenkins server connects to a Docker service. I'm running on my local system, so using a Unix socket is the best approach. And because…

Contents