Follow the given steps to update the Docker settings inside Jenkins:
- From the Jenkins dashboard, click on Manage Jenkins | Configure System.
- Scroll all the way down to the Cloud section (see the following screenshot).
- Under the Cloud section, click on the Add Docker Template button and choose Docker Template.
- You will be presented with lots of settings to configure. However, to keep this demo simple, let's stick to the important settings:
- Under the Docker Image field, enter the name of the Docker image that we created earlier. In our case, it's maven-build-slave-0.1.
- Under the Labels field, add a label. The Docker container will be recognized using this label by your Jenkins pipeline. Add a ...