Skip to content

QAutomatron/docker-jnlp-maven-slave

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins JNLP slave Docker image with Maven

qautomatron/docker-jnlp-maven-slave

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.

Running

To run a Docker container

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

To run a Docker container with Work Directory:

docker run qautomatron/docker-jnlp-maven-slave -url http://jenkins-server:port -workDir=/home/jenkins/agent <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
  • JENKINS_AGENT_WORKDIR: agent work directory, if not set by optional parameter -workDir

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.

About

Docker image to run a JNLP slave and Maven

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 60.6%
  • Dockerfile 37.0%
  • Makefile 2.4%