Jenkins docker slaves
They are available in the
The jenkins user is also a postgresql superuser. A basic build script for jenkins can be:
sudo service postgresql start createdb test DBNAME=test ./runtests.sh
WARNING: Neither docker and the image is safe against malicious code, so
consider that any developer who can push code and trigger a build can take
control of your jenkins server. If you don't trust the developer, carefully
review the code before trigger a build.
docker pull philpep/jenkins-slave:jessie
This is a debian jessie including:
- gcc 4.9
- Python 2.7 and 3.4
- PostgreSQL 9.4
- redis 2.8
- pip latest
- virtualenv latest
- tox latest
- docker latest
- arcanist latest
As you can see, this image can run docker in docker :)
This is convenient if your test/build process include docker.
You will have to run container privileged (an option configure in jenkins
Docker Template) and start docker within the build script.
sudo wrapdocker true [...]
You are advised to use a docker registry
mirror to save bandwidth
while pulling images.
sudo DOCKER_DAEMON_ARGS="--registry-mirror=http://mirror:5000" wrapdocker true [...]
For optimal performance, if you have a slow disks but a lot of RAM, you can run docker on tmpfs:
sudo mount -t tmpfs -o size=3G tmpfs /var/lib/docker sudo wrapdocker true [...]