For all connection methods, Jenkins will start by triggering a docker run
.
Then, after this step, there will optionally be more steps to establish the connection.
There is currently three alternative ways to connect your Jenkins master
to the dynamically provisioned Docker agents.
There are different pros and cons for each connection method. Depending on your environment, choose the one matching your needs. More detailed prerequisites are provided once you select a given method.
docker exec
,
all by using the Docker API.
The agent does not need to be able to reach the master through the network layers
to communicate ; all will go through Docker API.
docker run
command with the right secret.
And the remoting agent will establish the connection with the master through the network.
Hence, the agent must be able to access the master through its address and port.