jenkinsci / docker

Docker official jenkins repo
https://hub.docker.com/r/jenkins/jenkins
MIT License
6.72k stars 4.55k forks source link

Proposal to add some 'cookbook' docker files #208

Open jimzucker opened 8 years ago

jimzucker commented 8 years ago

The jenkins image is great, but to make it useful:

  1. you have to install plugins, its odd git/maven are not standard. (its a bit of work to find the plugins you have installed and get the right file format, see #206, #207
  2. If you modify the volume, by copying files you have to use some other standard patterns in your docker file to get the permissions right. (I'm my example I added some jobs for creating a demo.) Ie you have to change the entry point and install gosu to get it all working

All of these things are standard docker stuff but having a more complete cookbook with example files will help people move faster if they are not docker experts

Example: https://github.com/capitalone/Hygieia/tree/master/test-servers/jenkins

@rtyler as we discussed at the meet up tonight

jimzucker commented 8 years ago

Related to #197

zhibek commented 7 years ago

It seems to me proposals in @jimzucker's repo would be very useful additions to the official jenkins/docker repo.

When setting up new Jenkins instances on Docker, I want to keep all the configuration in code. Currently, the docker image is forcing me to resort to the admin UI.

For example, setup for relatively trivial jobs (i.e. jobs which are defined by a Jenkinsfile in a git repo) should not require admin UI intervention. Ideally this kind of repo could/should be added via a cli command triggered from within the docker script - the only argument should need to be the path to the git repo containing the Jenkinsfile.

naisanza commented 6 years ago

Currently, when adding a bind-mount, it mounts an empty directory to Jenkins, with root owner. I can't get it to run a "precommand" to change the ownership of the mounted volume to jenkins, which is why I think my docker container is failing, because of the permissions