Based on jenkinsci/docker-inbound-agent
View available options.
docker build -t jenkins-agent-linux .
docker run -v /var/run/docker.sock:/var/run/docker.sock --env JENKINS_URL=https://jenkins --env JENKINS_SECRET=xxx --env JENKINS_AGENT_NAME=agent-name jenkins-agent-linux
Based on jdk11-windowsservercore-ltsc2019
docker build -t jenkins-agent-windows .
docker run -m 2GB --env JENKINS_URL=https://jenkins --env JENKINS_SECRET=xxx --env JENKINS_AGENT_NAME=agent-name jenkins-agent-windows