Create Dockerfile

Signed-off-by: ssrikkanth <ssrikkanth.edu@gmail.com>
This commit is contained in:
ssrikkanth 2025-05-12 17:29:33 -07:00 committed by GitHub
parent c5af32d5a1
commit 4c5d0a5711
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 Spring Boot app using Maven
FROM maven:3.9.4-eclipse-temurin-17 AS build
WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests
# Stage 2: Run the app using a lightweight base image
FROM eclipse-temurin:17-jdk-alpine
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]