-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
32 lines (24 loc) · 898 Bytes
/
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
FROM jenkins
MAINTAINER Bahadir Yagan <[email protected]>
USER root
RUN apt-get update
RUN apt-get install -y apparmor \
git \
mercurial \
docker.io
# Setup Maven
ENV MAVEN_VERSION 3.3.3
RUN curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
COPY settings.xml /root/.m2/settings.xml
# Confiure Jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
COPY config.groovy /usr/share/jenkins/ref/init.groovy.d/config.groovy
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
# Volumes
VOLUME /root/.ssh
# Start it all
COPY init.sh /usr/local/bin/init.sh
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/init.sh"]