Created
April 18, 2021 17:16
-
-
Save enesusta/0dd9b448560ce75780f19644f1a58f13 to your computer and use it in GitHub Desktop.
jdk11 dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM adoptopenjdk/openjdk11-openj9:x86_64-alpine-jdk11u-nightly-slim as build | |
ENV MAVEN_VERSION 3.5.4 | |
ENV MAVEN_HOME /usr/lib/mvn | |
ENV PATH $MAVEN_HOME/bin:$PATH | |
COPY ./ ./ | |
RUN apk add wget | |
RUN wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \ | |
tar -zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz && \ | |
rm apache-maven-$MAVEN_VERSION-bin.tar.gz && \ | |
mv apache-maven-$MAVEN_VERSION /usr/lib/mvn | |
RUN mvn clean install -DskipTests=true | |
FROM adoptopenjdk/openjdk11-openj9:x86_64-alpine-jre11u-nightly | |
EXPOSE 8080 | |
ENV TZ=Europe/Istanbul | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
ENV JAVA_OPTS "" | |
COPY --from=build any.jar any.jar | |
CMD ["java", "jar", "any.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment