Skip to content

Commit 9c93a52

Browse files
committed
Add Dockerfile for Render deployment
1 parent 22e3252 commit 9c93a52

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Docker

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Use official Maven image to build the app
2+
FROM maven:3.9.6-eclipse-temurin-17 AS build
3+
WORKDIR /app
4+
COPY . .
5+
RUN mvn clean package -DskipTests
6+
7+
# Use a lightweight JDK base image to run the app
8+
FROM eclipse-temurin:17-jdk-jammy
9+
WORKDIR /app
10+
COPY --from=build /app/target/*.jar app.jar
11+
EXPOSE 8080
12+
ENV PORT=8080
13+
ENTRYPOINT ["java", "-jar", "app.jar"]

0 commit comments

Comments
 (0)