Public Repository

Last pushed: 2 months ago
Short Description
A variant of the public maven repo using IBM JDK
Full Description

Dockerfile

Forked from https://github.com/carlossg/docker-maven.git

FROM ibmjava:8-sdk AS build

ARG MAVEN_VERSION=3.5.0
ARG SHA=beb91419245395bd69a4a6edad5ca3ec1a8b64e41457672dc687c173a495f034
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries

RUN apt-get update && apt-get install -y ca-certificates curl \
  && rm -rf /var/lib/apt/lists/* \
  && mkdir -p /usr/share/maven /usr/share/maven/ref \
  && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-$MAVEN_VERSION-bin.tar.gz \
  && echo "${SHA}  /tmp/apache-maven.tar.gz" | sha256sum -c - \
  && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
  && rm -f /tmp/apache-maven.tar.gz \
  && apt-get purge -y --auto-remove ca-certificates curl


FROM ibmjava:8-sdk

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

COPY --from=build $MAVEN_HOME/ $MAVEN_HOME/
RUN ln -s $MAVEN_HOME/bin/mvn /usr/bin/mvn

COPY mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY settings-docker.xml $MAVEN_HOME/ref/

VOLUME "$USER_HOME_DIR/.m2"

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
Docker Pull Command
Owner
manujbhatia

Comments (0)