eea / eea.docker.jenkins.slave

Docker image for Jenkins slave (Jenkins Swarm Plugin)
6 stars 12 forks source link

Jenkins slave ready to run Docker image (Jenkins Swarm Plugin)

Docker images for Jenkins slave based on Jenkins Swarm Plugin.

Works best in combination with eeacms/jenkins-master

This image is generic, thus you can obviously re-use it within your non-related EEA projects.

Supported tags and respective Dockerfile links

See older versions

Changes

Base docker image

Source code

Installation

  1. Install Docker.
  2. Install Docker Compose.

Usage

$ docker run eeacms/jenkins-slave

Advanced usage

Add user and password to connect jenkins slaves to jenkins master

$ docker run eeacms/jenkins-slave -username foo -password secret

or via environment variables:

$ docker run -e JENKINS_USER=foo -e JENKINS_PASS=secret eeacms/jenkins-slave

See --help for more options:

$ docker run --rm eeacms/jenkins-slave --help

Also see EEA Jenkins master-slave orchestration for a complete guide on running a Jenkins master-slave stack.

Supported environment variables

Extend

Even if this image has some common system libraries pre-installed at some point your projects may have system dependencies that are not installed on this image. Thus, you'll have to build your own custom Jenkins slave Docker image based on this one by adding a Dockerfile and then run:

$ docker build -t jenkins-slave-custom .

Dockerfile

FROM eeacms/jenkins-slave

USER root
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
    foo \
    bar \
 && rm -rf /var/lib/apt/lists/*
USER jenkins

Troubleshooting

If the jenkins slaves fail to connect you can either directly provide JENKINS_MASTER env URL or within your favorite browser head to http://<your.jenkins.master.ip>/configure and update Jenkins URL property to match your jenkins server IP/DOMAIN (http://<your.jenkins.master.ip>/) then restart jenkins slave.

Copyright and license

The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.

The Original Code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Funding

European Environment Agency (EU)