Skip to content

Commit

Permalink
Bindu | Fix docker container not starting on local and lower env issue (
Browse files Browse the repository at this point in the history
  • Loading branch information
binduak authored Nov 29, 2023
1 parent 1a0cedf commit cb3c2b8
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
FROM eclipse-temurin:17-jdk-alpine
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

0 comments on commit cb3c2b8

Please sign in to comment.