forked from beedemo/cje-mm
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
44 lines (30 loc) · 1.42 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM cloudbees/cloudbees-core-mm:2.164.3.2
LABEL maintainer "[email protected]"
USER root
ARG user=jenkins
#skip setup wizard and disable CLI
ENV JVM_OPTS -Djenkins.CLI.disabled=true -server
ENV TZ="/usr/share/zoneinfo/America/New_York"
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
#Jenkins system configuration via init groovy scripts - see https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Jenkins+upon+start+up
COPY ./init.groovy.d/* /usr/share/jenkins/ref/init.groovy.d/
COPY ./license-activated/* /usr/share/jenkins/ref/license-activated-or-renewed-after-expiration.groovy.d/
COPY ./quickstart/* /usr/share/jenkins/ref/quickstart.groovy.d/
#install suggested and additional plugins
ENV JENKINS_UC http://jenkins-updates.cloudbees.com
#config-as-code plugin configuration
COPY config-as-code.yml /usr/share/jenkins/config-as-code.yml
ENV CASC_JENKINS_CONFIG /usr/share/jenkins/config-as-code.yml
COPY ./jenkins_ref /usr/share/jenkins/ref
#install suggested and additional plugins
ENV JENKINS_UC http://jenkins-updates.cloudbees.com
ENV TRY_UPGRADE_IF_NO_MARKER=true
RUN mkdir -p /usr/share/jenkins/ref/plugins
RUN chown -R ${user} /usr/share/jenkins/ref
USER ${user}
COPY ./jenkins_ref /usr/share/jenkins/ref
COPY plugins.txt plugins.txt
COPY jenkins-support /usr/local/bin/jenkins-support
COPY install-plugins.sh /usr/local/bin/install-plugins.sh
RUN /usr/local/bin/install-plugins.sh $(cat plugins.txt)
user jenkins