Sign inSign up

seeruk/jenkins-slave

By seeruk

•Updated about 9 years ago

Docker Image packaging for a Jenkins Slave.

Image
0

882

seeruk/jenkins-slave repository overview

⁠Docker Jenkins Slave

Docker Image packaging for a Jenkins Slave. This image is built on top of seeruk/java⁠, and is available on the Docker Hub⁠.

⁠Usage

The following environment variables are available to configure the slave.

  • JAVA_OPTS: Used to customise the JVM running the slave. By default sets file encoding to UTF8.
  • JENKINS_HOME: The host directory of the slave user.
  • JENKINS_UID: The UID of the jenkins user.
  • JENKINS_GID: The GID of the group that will be assigned to the jenkins user (by default this group will be called jenkins if it doesn't exist).
  • MASTER_HOST: This is the IP/hostname of the master node.
  • MASTER_PORT: This is the port of the master node.
  • SLAVE_NAME: The name, in your master node, of the slave you're setting up.
  • SLAVE_WORKSPACE: The workspace directory that will be used for builds. When setting up the slave in your Jenkins master node it should have it's workspace directory set to this.

The slave must have been created in the master node prior to running this container, otherwise the slave will fail to start. When configuring these environment variables, consider whether or not your Jenkins master is also in a Docker container; if it is linked, it may be better to use the hostname and port of the linked container, instead of the exposed host and port.

⁠Notes

  • This image is currently built on OpenJDK 8. It was previously built on top of Oracle Java, but the base image for that required the license for Oracle Java to be automatically accepted for you. This is no longer necessary.
  • This image should be started as root (i.e. don't set a user, Docker by default will run containers as root). When the container starts up it will use gosu to switch to the Jenkins user. The Jenkins user information can be configured by using the above environment variables.

⁠License

MIT

⁠Contributing

Feel free to open a pull request⁠, or file an issue⁠ on Github. I always welcome contributions as long as they're for the benefit of all (potential) users of this image.

If you're unsure about anything, feel free to ask about it in an issue before you get your heart set on fixing it yourself.

Tag summary

Content type

Image

Digest

Size

247.4 MB

Last updated

about 9 years ago

docker pull seeruk/jenkins-slave