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.
1 parent 7d58281 commit 313ee35Copy full SHA for 313ee35
Dockerfile
@@ -0,0 +1,12 @@
1
+# Step 1: Use Maven with JDK 17 to build the app
2
+FROM maven:3.9.9-eclipse-temurin-17 AS builder
3
+WORKDIR /app
4
+COPY pom.xml .
5
+COPY src ./src
6
+RUN mvn clean package -DskipTests
7
+# Step 2: Use lightweight JRE 17 for running the app
8
+FROM eclipse-temurin:17.0.15_6-jre
9
10
+COPY --from=builder /app/target/back-end-0.0.1-SNAPSHOT.jar app.jar
11
+EXPOSE 8080
12
+ENTRYPOINT ["java", "-jar", "app.jar"]
0 commit comments