blob: bc5e3649a9c3610d915ef665145680bfa06c387d [file] [log] [blame]
Michael Neale93ac93b2014-07-09 16:52:21 +10001FROM ubuntu:14.04
Michael Neale2627b962014-07-21 15:52:23 +10002
Michael Neale5e655bf2014-09-26 09:22:01 +10003RUN echo "1.565.2" > .lts-version-number
Michael Neale2627b962014-07-21 15:52:23 +10004
Carlos Sanchez19c878e2014-09-10 11:14:32 +02005RUN apt-get update && apt-get install -y wget git curl zip && apt-get clean
6RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk && apt-get clean
7RUN apt-get update && apt-get install -y maven ant ruby rbenv make && apt-get clean
Michael Neale2627b962014-07-21 15:52:23 +10008
Michael Neale3e124ed2014-07-18 15:12:27 +10009RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
10RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list
Michael Nealeddcb7cc2014-07-14 12:01:49 +100011RUN apt-get update && apt-get install -y jenkins
NĂ©stor Salceda6d120892014-08-28 12:23:04 +020012RUN usermod -m -d /var/jenkins_home jenkins
Michael Neale640f91d2014-07-09 18:56:29 +100013RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
Michael Neale57de5eb2014-07-15 19:41:30 +100014ADD init.groovy /tmp/WEB-INF/init.groovy
Carlos Sanchez19c878e2014-09-10 11:14:32 +020015RUN cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy && rm -rf /tmp/WEB-INF
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020016ADD ./jenkins.sh /usr/local/bin/jenkins.sh
17RUN chmod +x /usr/local/bin/jenkins.sh
Michael Neale640f91d2014-07-09 18:56:29 +100018USER jenkins
19
Michael Neale3e124ed2014-07-18 15:12:27 +100020# VOLUME /var/jenkins_home - bind this in via -v if you want to make this persistent.
Alex Leonhardt29abe2d2014-09-24 16:25:19 +010021VOLUME /var/jenkins_home
Michael Neale9be25dd2014-07-09 18:47:57 +100022ENV JENKINS_HOME /var/jenkins_home
Michael Neale3e124ed2014-07-18 15:12:27 +100023
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020024# define url prefix for running jenkins behind Apache (https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
25ENV JENKINS_PREFIX /
26
Michael Neale3e124ed2014-07-18 15:12:27 +100027# for main web interface:
28EXPOSE 8080
29
30# will be used by attached slave agents:
31EXPOSE 50000
Michael Neale2627b962014-07-21 15:52:23 +100032
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020033CMD ["/usr/local/bin/jenkins.sh"]