Interview Prep/Jenkins/Best practices & rapid-fire commands

Rapid-fire: how do you connect an inbound agent with Docker?

BeginnerConceptBest practices & rapid-fire commands
Answer

Create the node in Jenkins (launch method: inbound), copy the secret, then:

docker run -d --name agent-1 --init jenkins/inbound-agent:latest-jdk21 \
  -url https://jenkins.example.com/ -webSocket \
  -secret 3f2a... -name agent-1 -workDir /home/jenkins/agent

With WebSocket only port 443/8080 is needed. Pin the inbound-agent tag in production.

All Jenkins questions Roadmap: Jenkins

More on Best practices & rapid-fire commands