Docker-Jenkins-Agent
Create folder on my laptop to be a volumn mapping
Go to users directory of Mac then
>mkdir jenkins
Start docker desktop , then open terminal
run command below
docker run -p 8080:8080 -p 50000:50000 -v "$PWD/jenkins:/var/jenkins_home" jenkins/jenkins:lts
After pull jenkins finish , open browser then nevigate to below
http://localhost:8080
then install all plugin
go to manage jenkins | Manage node and Clouds
click on New node and config follow below
You will see DOCKER1 below
Click on Docker1
then click on Agent.jar then save to Download Folder
click on Lunch button and save it to download folder too.
Then copy command
then open terminal and neviagate to Download folder and Path command as below
Agent should conneted success as below.
back to Jenkins and refresh it
back to list and click on Master
Click configure then set # of executors to 0
save and return to main jenkins Dashboard and create new Item to test project as you want. Jenkins will build project as your computer can do.