❗ Warning! This image used to be published as jenkinsci/ssh-slave and jenkins/ssh-slave. These images are deprecated, use jenkins/ssh-agent.
A Jenkins agent image which allows using SSH to establish the connection. It can be used together with the SSH Build Agents plugin or other similar plugins.
See Jenkins Distributed builds for more info.
To run a Docker container
docker run jenkins/ssh-agent "<public key>"
You'll then be able to connect this agent using the SSH Build Agents plugin as "jenkins" with the matching private key.
To use this image with Docker Plugin, you need to
pass the public SSH key using environment variable JENKINS_AGENT_SSH_PUBKEY
and not as a startup argument.
In Environment field of the Docker Template (advanced section), just add:
JENKINS_AGENT_SSH_PUBKEY=<YOUR PUBLIC SSH KEY HERE>
Don't put quotes around the public key. You should be all set.
The image has several supported configurations, which can be accessed via the following tags:
latest
: Latest version with the newest remoting (based onopenjdk:8-jdk
)jdk11
: Latest version with the newest remoting and Java 11 (based onopenjdk:11-jdk
)alpine
: Small image based on Alpine Linux (based onadoptopenjdk/openjdk8:jdk8u${version}-alpine
)jdk8-windowsservercore-1809
: Latest version with the newest remoting (based onadoptopenjdk:8-jdk-hotspot-windowsservercore-1809
)jdk11-windowsservercore-1809
: Latest version with the newest remoting and Java 11 (based onadoptopenjdk:11-jdk-hotspot-windowsservercore-1809
)jdk8-nanoserver-1809
: Latest version with the newest remoting with Windows Nano Serverjdk11-nanoserver-1809
: Latest version with the newest remoting with Windows Nano Server and Java 11
See GitHub Releases. Note that the changelogs and release tags were introduced in Dec 2019, and there is no entries for previous patches. Please consult with the commit history if needed.