So far, we have used the Jenkins images pulled from the internet. We used jenkins/jenkins for the master container and evarga/jenkins-slave for the slave container. However, you may want to build your own images to satisfy the specific build environment requirements. In this section, we will cover how to do it.
Custom Jenkins images
Building the Jenkins slave
Let's start from the slave image, because it's more frequently customized. The build execution is performed on the agent, so it's the agent that needs to have the environment adjusted to the project we would like to build. For example, it may require the Python interpreter if our project is written in Python. The same applies to any library, tool, or testing...