Create Dockerfile

Signed-off-by: bhavanab2312 <bhavanab2312@gmail.com>
This commit is contained in:
bhavanab2312 2025-12-23 17:12:54 +05:30 committed by GitHub
parent fd4361b118
commit 46a93f8c07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM maven:3.9.9-eclipse-temurin-21 AS builder
WORKDIR /sujith
RUN git clone https://github.com/spring-projects/spring-petclinic.git
RUN cd /sujith/spring-petclinic && mvn clean package -DskipTests
FROM eclipse-temurin:21-jdk
COPY --from=builder /sujith/spring-petclinic/target/*.jar /sujith/app.jar
EXPOSE 8080
CMD ["java", "-jar", "/sujith/app.jar"]