We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 984b27f + a57695f commit ff066f8Copy full SHA for ff066f8
Dockerfile
@@ -1,12 +1,29 @@
1
# Step 1: Use Maven with JDK 17 to build the app
2
FROM maven:3.9.9-eclipse-temurin-17 AS builder
3
+
4
+# WORKDIR /app section
5
WORKDIR /app
6
7
+# pom.xml section
8
COPY pom.xml .
9
10
+# src ./src section
11
COPY src ./src
12
13
+# RUN section
14
RUN mvn clean package -DskipTests
15
16
# Step 2: Use lightweight JRE 17 for running the app
17
FROM eclipse-temurin:17.0.15_6-jre
18
19
20
21
22
+# from=builder section
23
COPY --from=builder /app/target/back-end-0.0.1-SNAPSHOT.jar app.jar
24
25
+# Port section
26
EXPOSE 8080
27
28
+# ENTRYPOINT section
29
ENTRYPOINT ["java", "-jar", "app.jar"]
0 commit comments