blob: 44cc08fed4cb4f2968cc628870d479cc4cdfa69f [file] [log] [blame]
Nicolas De Loof05080682014-10-01 10:50:33 +02001#FROM java:openjdk-7u65-jdk
2FROM java:7u65
Michael Neale2627b962014-07-21 15:52:23 +10003
Tianon Gravic9c889b2014-09-29 11:37:09 -06004RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
Michael Neale2627b962014-07-21 15:52:23 +10005
Nicolas De Loof57d92432014-10-02 08:59:04 +02006ENV JENKINS_VERSION 1.565.3
Nicolas De Loof070a1ce2014-10-01 11:22:32 +02007RUN mkdir /usr/share/jenkins/
8RUN useradd -d /home/jenkins -m -s /bin/bash jenkins
Carlos Sanchezc223beb2014-10-02 11:06:30 +02009
Nicolas De Loof20f7e912014-10-04 08:42:13 +020010COPY init.groovy /tmp/WEB-INF/init.groovy.d/tcp-slave-angent-port.groovy
Carlos Sanchezc223beb2014-10-02 11:06:30 +020011RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war \
Nicolas De Loof20f7e912014-10-04 08:42:13 +020012 && cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy.d/tcp-slave-angent-port.groovy && rm -rf /tmp/WEB-INF
Tianon Gravic9c889b2014-09-29 11:37:09 -060013
Michael Neale9be25dd2014-07-09 18:47:57 +100014ENV JENKINS_HOME /var/jenkins_home
Tianon Gravic9c889b2014-09-29 11:37:09 -060015RUN usermod -m -d "$JENKINS_HOME" jenkins && chown -R jenkins "$JENKINS_HOME"
16VOLUME /var/jenkins_home
17
Vincent Dupain1ac0bcd2014-08-18 15:06:43 +020018# define url prefix for running jenkins behind Apache (https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
19ENV JENKINS_PREFIX /
20
Michael Neale3e124ed2014-07-18 15:12:27 +100021# for main web interface:
Michael Nealefe683742014-09-26 20:49:30 +100022EXPOSE 8080
Michael Neale3e124ed2014-07-18 15:12:27 +100023
24# will be used by attached slave agents:
Michael Nealefe683742014-09-26 20:49:30 +100025EXPOSE 50000
Michael Neale2627b962014-07-21 15:52:23 +100026
Tianon Gravic9c889b2014-09-29 11:37:09 -060027USER jenkins
Nicolas De Loof28d0c592014-10-01 15:07:26 +020028
Nicolas De Loofd6064382014-10-04 08:17:28 +020029COPY jenkins.sh /usr/local/bin/jenkins.sh
30ENTRYPOINT ["/usr/local/bin/jenkins.sh"]