-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
28 lines (21 loc) · 1.11 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
FROM frekele/java:jdk7u75
MAINTAINER frekele <leandro.freitas@softdevelop.com.br>
ENV MAVEN_VERSION=3.3.9
ENV MAVEN_HOME=/opt/mvn
# change to tmp folder
WORKDIR /tmp
# Download and extract maven to opt folder
RUN wget --no-check-certificate --no-cookies http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& wget --no-check-certificate --no-cookies http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz.md5 \
&& echo "$(cat apache-maven-${MAVEN_VERSION}-bin.tar.gz.md5) apache-maven-${MAVEN_VERSION}-bin.tar.gz" | md5sum -c \
&& tar -zvxf apache-maven-${MAVEN_VERSION}-bin.tar.gz -C /opt/ \
&& ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/mvn \
&& rm -f apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& rm -f apache-maven-${MAVEN_VERSION}-bin.tar.gz.md5
# add executables to path
RUN update-alternatives --install "/usr/bin/mvn" "mvn" "/opt/mvn/bin/mvn" 1 && \
update-alternatives --set "mvn" "/opt/mvn/bin/mvn"
# Add the files
ADD rootfs /
# change to root folder
WORKDIR /root