area51/jenkins
The Jenkins CI Build/Integration server in a Docker image
The area51/jenkins image contains the current Jenkins 2.x application within a self-contained docker image.
Usage
To try jenkins out without worrying about persistence (if the container is restarted it will be a fresh install)
# docker run --name=jenkins --hostname=jenkins area51/jenkins
then find the local IP address:
# docker inspect --format '{{ .NetworkSettings.IPAddress }}' jenkins 172.17.0.4
Then in your browser go to http://172.17.0.4/
An example of launching a new jenkins instance with the jenkins configuration in the directory /home/jenkins of the docker host.
# docker run -d \ --restart=always \ --name=jenkins --hostname=jenkins \ -v /home/jenkins:/opt/jenkins \ area51/jenkins
Slaves
Although you can run this standalone it's better to use additional slaves in separate containers for your jobs. Not only does it separate the builds from the server it also makes maintenance easier - not only does this follow the advice of Docker in keeping a container for a single purpose, it's easier to destroy a container and restart a fresh one than do that with the jenkins server.
The slaves we provide are:
Image | Application Support | Languages | Description | ||
---|---|---|---|---|---|
Jenkins | CloudBees | NetBeans | |||
area51/jenkins-slave | Yes | Java 8 | Standard Jenkins Slave with Java 8 installed | ||
area51/alpine-dev | Yes | Yes | No | Java 8, C | Alpine linux build environment |
area51/debian-dev | Yes | Yes | Partial | Java 8, C | Debian linux build environment |
area51/ubuntu-dev | Yes | Yes | Yes | Java 8, C | Ubuntu linux build environment |
- Jenkins Slave - you can define a running image as a generic jenkins slave
- CloudBees support - the image supports dynamic provisioning using the CloudBees docker custom build environment plugin.
- NetBeans support - the image supports being used as a build slave to NetBeans
Volumes
mount point | content |
---|---|
/opt/jenkins | the directory where jenkins configuration (build jobs, workspaces etc) is placed |
Environment Variables
Variable | Description |
---|---|
JENKINS_OPTS | Options to pass to jenkins |