Skip to content

Commit

Permalink
Merge pull request #89 from SpringBootCourses/dev
Browse files Browse the repository at this point in the history
#87 Improve Dockerfile
  • Loading branch information
IlyaLisov authored May 27, 2024
2 parents 8feaf6f + fe5e2fb commit e1929bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
14 changes: 9 additions & 5 deletions core.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM maven:3.8.5-openjdk-17 AS build
WORKDIR /app
COPY event-handler/ event-handler/
COPY common/ common/
COPY core-service/ core-service/
COPY suppressions.xml .
COPY pom.xml .
RUN mvn -f pom.xml clean package
COPY event-handler/pom.xml event-handler/
COPY common/pom.xml common/
COPY core-service/pom.xml core-service/
COPY suppressions.xml .
RUN mvn dependency:go-offline
COPY event-handler/src event-handler/src
COPY common/src common/src
COPY core-service/src core-service/src
RUN mvn clean package -DskipTests

FROM openjdk:17-jdk-slim
COPY --from=build /app/core-service/target/*.jar application.jar
Expand Down
14 changes: 9 additions & 5 deletions event-handler.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM maven:3.8.5-openjdk-17 AS build
WORKDIR /app
COPY event-handler/ event-handler/
COPY common/ common/
COPY core-service/ core-service/
COPY suppressions.xml .
COPY pom.xml .
RUN mvn -f pom.xml clean package
COPY event-handler/pom.xml event-handler/
COPY common/pom.xml common/
COPY core-service/pom.xml core-service/
COPY suppressions.xml .
RUN mvn dependency:go-offline
COPY event-handler/src event-handler/src
COPY common/src common/src
COPY core-service/src core-service/src
RUN mvn clean package -DskipTests

FROM openjdk:17-jdk-slim
COPY --from=build /app/event-handler/target/*.jar application.jar
Expand Down

0 comments on commit e1929bd

Please sign in to comment.