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 maven:3.6.3-jdk-8 AS builder | |
ADD . /app | |
WORKDIR /app | |
RUN mvn -f /app/pom.xml clean package -DskipTests | |
FROM openjdk:8-jre-slim | |
COPY --from=builder /app/target/<TARGET-JAR-FILE-NAME>.jar app.jar | |
EXPOSE 8080 | |
ENTRYPOINT ["java","-jar","app.jar"] |
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 maven:3.8.3-openjdk-17 AS builder | |
ADD . /app | |
WORKDIR /app | |
RUN mvn -f /app/pom.xml clean package | |
FROM openjdk:17.0.1-jdk-slim | |
COPY --from=builder /app/target/<TARGET-JAR-FILE-NAME>.jar app.jar | |
EXPOSE 8080 | |
ENTRYPOINT ["java","-jar","app.jar"] |