Different use cases for building a pipeline in Jenkins, the sample projects in this demo use maven as a build management tool:
Run directly on the host with maven installed from global tool section
Run the pipeline in a docker container with an official image
Run the pipeline in a docker container with a custom image
Run docker commands directly on the host to build an image and run a container
Boot up a container as an agent
Repos used in this demo:
https://github.com/amado-saladino/mav...
https://github.com/amado-saladino/res...
Plugins:
docker plugin
docker pipeline plugin