ymanager/server/Dockerfile @ 37576194
1 |
FROM maven:3.6-jdk-11 |
---|---|
2 |
ARG BUILD_DIR=/app |
3 |
|
4 |
WORKDIR $BUILD_DIR |
5 |
|
6 |
#fetch dependencies and cache them, this will run only of pom.xml changes
|
7 |
COPY pom.xml . |
8 |
RUN mvn install |
9 |
|
10 |
# do the actual build
|
11 |
COPY src/ src/ |
12 |
RUN mvn clean install |
13 |
|
14 |
FROM adoptopenjdk/openjdk11 |
15 |
COPY --from=build /app/target/*.jar /app/ |
16 |
RUN mv /app/*.jar app.jar |
17 |
ENTRYPOINT ["java","-jar","/app.jar"] |