The leading open source automation server
4.8K
The leading open source automation server
This is a fully functional Jenkins server, based on the weekly and LTS releases .

docker pull idoall/jenkins:2.138.3Read documentation for usage
# 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
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 location | Container location | Usage |
|---|---|---|
/srv/home | /var/jenkins_home | For storing application 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)
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
Content type
Image
Digest
Size
306.8 MB
Last updated
about 6 years ago
docker pull idoall/jenkins