From abc1dd25235bde2078cc49308a469975d5e6c551 Mon Sep 17 00:00:00 2001 From: prasannakumar <142010251+spkumar17@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:45:14 +0530 Subject: [PATCH 1/4] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f220f25ff..6a06e7076 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,11 @@ FROM openjdk:17-jdk-alpine WORKDIR /app # Copy the JAR file from the host machine to the container -COPY target/spring-petclinic-3.3.0-SNAPSHOT.jar . +COPY ./target/spring-petclinic-3.3.0-SNAPSHOT.jar . # Expose the port your application runs on EXPOSE 80 # Set the entry point to run the JAR file -ENTRYPOINT ["java", "-jar", "spring-petclinic-3.3.0-SNAPSHOT.jar"] \ No newline at end of file +ENTRYPOINT ["java", "-jar", "spring-petclinic-3.3.0-SNAPSHOT.jar"] From d3545313d1b82bfaf523d432c1efd6d72216aefc Mon Sep 17 00:00:00 2001 From: prasannakumar <142010251+spkumar17@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:59:49 +0530 Subject: [PATCH 2/4] Update Dockerfile modifled docker file --- Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a06e7076..626ef2549 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,9 @@ -# Use an OpenJDK base image FROM openjdk:17-jdk-alpine -# Setting the working directory in the container -WORKDIR /app +WORKDIR /app/petclinic -# Copy the JAR file from the host machine to the container -COPY ./target/spring-petclinic-3.3.0-SNAPSHOT.jar . +COPY target/spring-petclinic-3.3.0-SNAPSHOT.jar . - -# Expose the port your application runs on EXPOSE 80 -# Set the entry point to run the JAR file ENTRYPOINT ["java", "-jar", "spring-petclinic-3.3.0-SNAPSHOT.jar"] From 96f13b9cb6b6b88f80be4ab4517943768d8bbada Mon Sep 17 00:00:00 2001 From: prasannakumar <142010251+spkumar17@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:28:47 +0530 Subject: [PATCH 3/4] Update application.properties 8888 --- src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 051d2d25c..8bd37b988 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -24,4 +24,4 @@ logging.level.org.springframework=INFO # Maximum time static resources should be cached spring.web.resources.cache.cachecontrol.max-age=12h -server.port=80 \ No newline at end of file +server.port=8888 From f6cc4088b0958adb02ea5740e2425bc00effbca3 Mon Sep 17 00:00:00 2001 From: prasannakumar <142010251+spkumar17@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:29:09 +0530 Subject: [PATCH 4/4] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 626ef2549..fee443960 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ WORKDIR /app/petclinic COPY target/spring-petclinic-3.3.0-SNAPSHOT.jar . -EXPOSE 80 +EXPOSE 8888 + ENTRYPOINT ["java", "-jar", "spring-petclinic-3.3.0-SNAPSHOT.jar"]