In the following section, we will learn how to install and configure the Docker plugin that will allow us to spawn on-demand Jenkins slaves (Docker containers) from a CI pipeline. The Docker containers are started by the CI pipeline, and once the build is done, they are destroyed. In the following section, we will only see the configuration part. It is in the next chapter that we will see this process in action.
Before we begin, make sure you have the following things ready:
- A Jenkins server running on any of the following platforms: Docker, standalone, cloud, VM, servlet container, and so on. (refer to Chapter 2, Installing Jenkins).
- Your Jenkins server should have access to the internet. This is necessary to download and install plugins.
- Your Jenkins server can talk to GitHub using the
GitHub plugin
. (Refer to the Add GitHub credentials inside Jenkins and Configure Webhooks on GitHub from Jenkins sections from Chapter 3, The New Jenkins...