Prerequisites for Docker Agent Launch Methods
masterDepending on how you want the agent to connect to Jenkins, your Docker image must meet specific requirements:
Launch via SSH
- Requires an
sshdserver and a JDK installed in the image. - Base Image Suggestion:
jenkins/ssh-agent. - Credentials: You can use standard OpenSSL
sshd(Jenkins injects an SSH key on startup) or provide manually configured SSH credentials. - User: If using
jenkins/ssh-agent, ensure the user is set tojenkins. - Verification: If the container's host SSH key is not trusted, set the SSH host key verification method to
non-verifyingin Jenkins.
Launch via JNLP (Inbound)
- Requires a JDK installed in the image.
- Base Image Suggestion:
jenkins/inbound-agent. - Connectivity: The Jenkins controller URL must be reachable from within the container.
- Configuration: The container is automatically configured with the agent's name and secret.
Launch Attached
- Requires a JDK installed in the image.
- Base Image Suggestion:
jenkins/agent.