https://www.coachdevops.com/2022/08/j...
Advantages of using Docker Containers as Jenkins Build Agents
Ephemeral
Better resource utilization
Customized agents as it can run different builds like Java 8, Java 11
Scalability
Pre-requisites:
Jenkins Master is already setup and running
port 8080 opened in Jenkins EC2's firewall rule
Setup Docker host. Creating another EC2 instance is recommended to serve as a Docker Host.
port 4243 opened in docker host machine
32768 - 60999 opened in docker host machine