blob: 458afab0ab5a147e11b0a24ea505c1382338025c [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
Michael Nealefe683742014-09-26 20:49:30 +10006RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk && apt-get clean bash
Michael Neale2627b962014-07-21 15:52:23 +10007
Michael Neale3e124ed2014-07-18 15:12:27 +10008RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
9RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list
Michael Nealeddcb7cc2014-07-14 12:01:49 +100010RUN apt-get update && apt-get install -y jenkins
NĂ©stor Salceda6d120892014-08-28 12:23:04 +020011RUN usermod -m -d /var/jenkins_home jenkins
Michael Neale640f91d2014-07-09 18:56:29 +100012RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
Michael Neale57de5eb2014-07-15 19:41:30 +100013ADD init.groovy /tmp/WEB-INF/init.groovy
Carlos Sanchez19c878e2014-09-10 11:14:32 +020014RUN 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 +020015ADD ./jenkins.sh /usr/local/bin/jenkins.sh
16RUN chmod +x /usr/local/bin/jenkins.sh
Michael Neale640f91d2014-07-09 18:56:29 +100017USER jenkins
18
Michael Neale3e124ed2014-07-18 15:12:27 +100019# VOLUME /var/jenkins_home - bind this in via -v if you want to make this persistent.
Michael Neale9be25dd2014-07-09 18:47:57 +100020ENV JENKINS_HOME /var/jenkins_home
Michael Neale3e124ed2014-07-18 15:12:27 +100021
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020022# define url prefix for running jenkins behind Apache (https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
23ENV JENKINS_PREFIX /
24
Michael Neale3e124ed2014-07-18 15:12:27 +100025# for main web interface:
Michael Nealefe683742014-09-26 20:49:30 +100026EXPOSE 8080
Michael Neale3e124ed2014-07-18 15:12:27 +100027
28# will be used by attached slave agents:
Michael Nealefe683742014-09-26 20:49:30 +100029EXPOSE 50000
Michael Neale2627b962014-07-21 15:52:23 +100030
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020031CMD ["/usr/local/bin/jenkins.sh"]