diff --git a/Dockerfile b/Dockerfile index 66c9734..028d76b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,14 @@ +# +# Build stage +# +FROM maven:3.8.6-amazoncorretto-17 AS build +COPY src /home/app/src +COPY pom.xml /home/app +RUN mvn -f /home/app/pom.xml clean package + +# +# Package stage +# FROM eclipse-temurin:17-jdk-alpine -VOLUME /tmp -ARG JAR_FILE -COPY ${JAR_FILE} app.jar -ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file +COPY --from=build /home/app/target/adobe-sign-0.0.1-SNAPSHOT.jar /usr/local/lib/app.jar +ENTRYPOINT ["java","-jar","/usr/local/lib/app.jar"]