Michael Neale | 93ac93b | 2014-07-09 16:52:21 +1000 | [diff] [blame] | 1 | FROM ubuntu:14.04 |
Michael Neale | 2627b96 | 2014-07-21 15:52:23 +1000 | [diff] [blame] | 2 | |
Michael Neale | a5bfd41 | 2014-08-05 20:46:29 +1000 | [diff] [blame^] | 3 | RUN echo "1.574" > .lts-version-number |
Michael Neale | 2627b96 | 2014-07-21 15:52:23 +1000 | [diff] [blame] | 4 | |
| 5 | RUN apt-get update && apt-get install -y wget git curl zip |
| 6 | RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk |
| 7 | RUN apt-get update && apt-get install -y maven=3.0.5-1 ant=1.9.3-2build1 ruby rbenv make |
| 8 | |
Michael Neale | 3e124ed | 2014-07-18 15:12:27 +1000 | [diff] [blame] | 9 | RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add - |
| 10 | RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list |
Michael Neale | ddcb7cc | 2014-07-14 12:01:49 +1000 | [diff] [blame] | 11 | RUN apt-get update && apt-get install -y jenkins |
Michael Neale | 640f91d | 2014-07-09 18:56:29 +1000 | [diff] [blame] | 12 | RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home |
Michael Neale | 57de5eb | 2014-07-15 19:41:30 +1000 | [diff] [blame] | 13 | ADD init.groovy /tmp/WEB-INF/init.groovy |
Michael Neale | 2627b96 | 2014-07-21 15:52:23 +1000 | [diff] [blame] | 14 | RUN cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy |
Michael Neale | 640f91d | 2014-07-09 18:56:29 +1000 | [diff] [blame] | 15 | USER jenkins |
| 16 | |
Michael Neale | 3e124ed | 2014-07-18 15:12:27 +1000 | [diff] [blame] | 17 | # VOLUME /var/jenkins_home - bind this in via -v if you want to make this persistent. |
Michael Neale | 9be25dd | 2014-07-09 18:47:57 +1000 | [diff] [blame] | 18 | ENV JENKINS_HOME /var/jenkins_home |
Michael Neale | 3e124ed | 2014-07-18 15:12:27 +1000 | [diff] [blame] | 19 | |
| 20 | # for main web interface: |
| 21 | EXPOSE 8080 |
| 22 | |
| 23 | # will be used by attached slave agents: |
| 24 | EXPOSE 50000 |
Michael Neale | 2627b96 | 2014-07-21 15:52:23 +1000 | [diff] [blame] | 25 | |
| 26 | CMD ["/usr/bin/java", "-jar", "/usr/share/jenkins/jenkins.war"] |