From cb3c2b842beb738407df5d8f4ce18e71d163c91d Mon Sep 17 00:00:00 2001 From: Himabindu T Date: Wed, 29 Nov 2023 11:51:05 +0530 Subject: [PATCH] Bindu | Fix docker container not starting on local and lower env issue (#18) --- Dockerfile | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0756482..c9a98d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,3 @@ -FROM amazoncorretto:17 as builder -ARG JAR_FILE=target/*.jar -COPY ${JAR_FILE} event-router-service.jar -RUN java -Djarmode=layertools -jar event-router-service.jar extract - - -FROM amazoncorretto:17 -RUN yum update -y && \ - yum install -y tzdata && \ - yum clean all -COPY --from=builder dependencies/ ./ -COPY --from=builder snapshot-dependencies/ ./ -COPY --from=builder spring-boot-loader/ ./ -COPY --from=builder application/ ./ -ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"] \ No newline at end of file +FROM eclipse-temurin:17-jdk-alpine +COPY target/*.jar app.jar +ENTRYPOINT ["java","-jar","/app.jar"]