Sign inSign up

idoall/jenkins

By idoall

Updated about 6 years ago

The leading open source automation server

Image
1

4.8K

idoall/jenkins repository overview

jenkins

The leading open source automation server

Jenkins Continuous Integration and Delivery server.

This is a fully functional Jenkins server, based on the weekly and LTS releases .

img

  • To use the latest 2.138.3: docker pull idoall/jenkins:2.138.3

Read documentation for usage

Developing

# Pull image
git clone https://github.com/idoall/docker.git
cd jenkins/2.138.3

# hack hack hack

# Build
docker build -t idoall/jenkins:2.138.3 .

# Run After running, wait for 1 minutes.
# Open http://localhost/ in your browser
docker run -it \
--rm \
--name=mshk_jenkins \
-p 80:8080 -p 50000:50000 \
idoall/jenkins:2.138.3

# access the contain
docker exec -it mshk_jenkins /bin/bash

Where is the data stored?

This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration. You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades :

Local locationContainer locationUsage
/srv/home/var/jenkins_homeFor storing application data

Backing up data

If you bind mount in a volume - you can simply back up that directory (which is jenkins_home) at any time.

This is highly recommended. Treat the jenkins_home directory as you would a database - in Docker you would generally put a database on a volume.

If your volume is inside a container - you can use docker cp $ID:/var/jenkins_home command to extract the data, or other options to find where the volume data is. Note that some symlinks on some OSes may be converted to copies (this can confuse jenkins with lastStableBuild links etc)

Setting the number of executors

You can specify and set the number of executors of your Jenkins master instance using a groovy script. By default its set to 2 executors, but you can extend the image and change it to your desired number of executors :

executors.groovy
import jenkins.model.*
Jenkins.instance.setNumExecutors(5)

and Dockerfile

FROM jenkins/jenkins:lts
COPY executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy

Tag summary

Content type

Image

Digest

Size

306.8 MB

Last updated

about 6 years ago

docker pull idoall/jenkins