cloudbees/jenkins-ci.org-docker — pull request #15 by carlossg (2014-10-01 08:59:33+00:00)
Title: Reducing size

A couple ideas to reduce the size of the image

Current image is 521.4MB
With JRE instead of JDK, and without git I got 476.7MB
Preventing the war copies it went down to 408.6MB

I wanted to ask you if there's another way to inject groovy init scripts without putting them into the zip file, to avoid downstream images repackaging of the war. Right now the only I can think of is:
* expand the war
* copy script into /var/jenkins_home/war/WEB-INF/init.groovy.d/
* start the war
all of it at run time. At build time I would end with two copies of the war contents.
If I just put the scripts before expanding the war they get deleted.

Is it possible to expand the war, delete it and run jenkins from the expanded dir? or that would prevent auto update and other features?
It'd be nice if groovy scripts could be added to /var/jenkins_home/.jenkins or any other dir outside of the war