-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
30 lines (22 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:16.04
MAINTAINER mlabouardy <mohamed@labouardy.com>
ENV JENKINS_UC https://updates.jenkins.io
ENV JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental
ENV JENKINS_HOME /var/jenkins_home
RUN mkdir -p /usr/share/jenkins/ref
RUN apt-get update && apt-get install -y --no-install-recommends wget curl openssh-client git \
unzip apt-transport-https openjdk-8-jdk
RUN wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
RUN echo "deb https://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y jenkins
RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
COPY jenkins-support /usr/local/bin/jenkins-support
COPY install-plugins.sh /usr/local/bin/plugins.sh
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN mkdir -p $JENKINS_HOME/plugins
RUN mv /usr/share/jenkins/ref/plugins/* $JENKINS_HOME/plugins/
EXPOSE 8080 50000
COPY jenkins.CLI.xml $JENKINS_HOME/jenkins.CLI.xml
COPY init.groovy.d $JENKINS_HOME/init.groovy.d
CMD ["/usr/bin/java", "-Djenkins.install.runSetupWizard=false", "-jar", "/usr/share/jenkins/jenkins.war"]