Caching Maven Dependencies with Docker - improvements

This commit is contained in:
Mladen Savic
2022-02-20 22:51:08 +01:00
parent 7f84f87902
commit fb851d088c
15 changed files with 107 additions and 103 deletions

View File

@@ -0,0 +1,15 @@
FROM maven:alpine as build
ENV HOME=/usr/app
RUN mkdir -p $HOME
WORKDIR $HOME
ADD pom.xml $HOME
RUN mvn verify --fail-never
ADD . $HOME
RUN mvn package
FROM openjdk:8-jdk-alpine
COPY --from=build /usr/app/target/single-module-caching-1.0-SNAPSHOT-jar-with-dependencies.jar /app/runner.jar
ENTRYPOINT java -jar /app/runner.jar