Skip to content

Commit

Permalink
Merge pull request #6 from EcoMind/feature/upgrade_mvn
Browse files Browse the repository at this point in the history
Upgraded: maven version to 3.8.6
  • Loading branch information
fragolinux committed Dec 6, 2022
2 parents 891eba8 + 71493c8 commit c709a45
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,31 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
&& \
rm -rf /var/lib/apt/lists/*

# Downloading and installing Maven
RUN apt-get remove maven -y

ARG MAVEN_VERSION=3.8.6
ARG USER_HOME_DIR="/root"
ARG SHA=f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& echo "Downlaoding maven" \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
\
&& echo "Checking download hash" \
&& echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
\
&& echo "Unziping maven" \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
\
&& echo "Cleaning and setting links" \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

ENV MAVEN_HOME /usr/share/maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"

WORKDIR /app

COPY dep-bootstrap.sh .
Expand Down

0 comments on commit c709a45

Please sign in to comment.