Skip to content

Commit ce64c80

Browse files
authored
Merge pull request #63 from SpringBootCourses/#62
#62 Improve Dockerfile
2 parents b405d95 + ed5d284 commit ce64c80

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM maven:3.8.5-openjdk-17 AS build
22
WORKDIR /
3+
COPY pom.xml .
4+
RUN mvn dependency:go-offline
35
COPY /src /src
4-
COPY checkstyle-suppressions.xml /
5-
COPY pom.xml /
6-
RUN mvn -f /pom.xml clean package
6+
COPY checkstyle-suppressions.xml .
7+
RUN mvn clean package -DskipTests
78

89
FROM openjdk:17-jdk-slim
910
COPY --from=build /target/*.jar application.jar

0 commit comments

Comments
 (0)