Add Dockerfile

Signed-off-by: vamsiknadella <nadellavamsik@gmail.com>
This commit is contained in:
vamsiknadella 2025-12-04 15:30:11 -08:00 committed by GitHub
parent 3e1ce239f4
commit 559c899e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
# Stage 1: Build the JAR file
FROM maven:3.8.5-openjdk-17 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package -DskipTests
# Stage 2: Run the JAR file
FROM openjdk:17-jdk-slim
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]