Public | Automated Build

Last pushed: a year ago
Short Description
Jenkins w/ Docker
Full Description

#jdocker

The base Jenkins with a docker client so you can use docker sockets.

usage

docker run -d \
  -p 80:8080 \
  -p 50000:50000 \
  -v /var/jenkins_home:/var/jenkins_home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  flyinprogrammer/jdocker

Our changes

First off all changes to the alpine jenkins container Dockerfile are noted in blocks of code that look like this:

######## CUSTOM EDITS ########
...
##############################

And for now there are two of these edits. The first installs gosu and docker. The second patches our container with a different entrypoint and removes dropping our users to Jenkins.

Custom entrypoint?

Yes. We still use the jenkins.sh script, however, before we use that script we need to make sure our Jenkins user can access the docker socket which is volume mounted to our container.
To do that we need to make sure a docker group is created with the same gid that our host uses, and we need to make sure our Jenkins users is a member of the group. Once those guarentees are made
we then use gosu to drop our shell into the Jenkins users and execute the jenkins.sh script.

Docker Pull Command
Owner
flyinprogrammer
Source Repository