Public | Automated Build

Last pushed: 20 hours ago
Short Description
A Jenkins slave using JNLP to establish connection
Full Description

Jenkins JNLP Agent Docker image

This is an image for Jenkins agent (FKA "slave") using JNLP to establish connection.
This agent is powered by the Jenkins Remoting library, which version is being taken from the base Docker Agent image.

See Jenkins Distributed builds for more info.


To run a Docker container

docker run jenkinsci/jnlp-slave -url http://jenkins-server:port <secret> <agent name>

Optional environment variables:

  • JENKINS_URL: url for the Jenkins server, can be used as a replacement to -url option, or to set alternate jenkins URL
  • JENKINS_TUNNEL: (HOST:PORT) connect to this agent host and port instead of Jenkins server, assuming this one do route TCP traffic to Jenkins master. Useful when when Jenkins runs behind a load balancer, reverse proxy, etc.
  • JENKINS_SECRET: agent secret, if not set as an argument
  • JENKINS_AGENT_NAME: agent name, if not set as an argument

Configuration specifics

Enabled JNLP protocols

By default, the JNLP3-connect is disabled due to the known stability and scalability issues.
You can enable this protocol on your own risk using the
JNLP_PROTOCOL_OPTS=-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=false property (the protocol should be enabled on the master side as well).

In Jenkins versions starting from 2.27 there is a JNLP4-connect protocol.
If you use Jenkins 2.32.x LTS, it is recommended to enable the protocol on your instance.

Amazon ECS

Make sure your ECS container agent is updated before running. Older versions do not properly handle the entryPoint parameter. See the entryPoint definition for more information.

Docker Pull Command
Source Repository

Comments (9)
4 months ago

Docker Hub is not a good way to ask for the support. Please use Jenkins channels like IRC or create an issue in

5 months ago

how to run docker commands and aws cli in my ecs slave.

7 months ago

how can i config remote workspace to make it works without Failed to mkdirs error

7 months ago

@alexvan @frangarcia 2.19.3 is ok.

10 months ago

Could somebody help me.
when i am trying to connect to jenkins its showing error:- Exception in thread "main" java.lang.RuntimeException: Root directory not writable.
And i am not understanding how to enable JNLP3 Protocol.
Can someone help me please.

a year ago

Go to the page for your slave:

Connect slave to Jenkins one of these ways:
launch agent Launch agent from browser on slave
Run from slave command line:
java -jar slave.jar -jnlpUrl http://<jenkins-server>/computer/<slave-name>/slave-agent.jnlp -secret f02c1009a70c12e6df36b5a23fbe4d50bc2a4dd12527c54480e6eb5753c7f7b6

And, there is the secret!
It isn't visible using the API or even jenkins-cli, though. I switched to creating a user and sending it with -jnlpCredentials username:token instead so that I an auto-provision slaves.

a year ago

a year ago

Is there any tutorial to make this slave works? I'm not able to connect to the master and I believe I'm missing some knowledge about the "secret".

a year ago

Where can I find the secret? I don't find it anywhere in jenkins.