File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
microservices/course-composite-service Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 11# spring-boot-based-microservices
22WIP revamping existing codebase to support new features
3+
4+ ## 1. Docker file - upgrade to java 17 slim image once available
Original file line number Diff line number Diff line change 1+ # stage 1
2+ # Start with a base image containing Java runtime
3+ # TODO :: Upgrade to slim jre version for 17 once available
4+ FROM openjdk:17-alpine as builder
5+ WORKDIR application
6+ ARG JAR_FILE=target/*.jar
7+ COPY ${JAR_FILE} application.jar
8+ RUN java -Djarmode=layertools -jar application.jar extract
9+
10+ # the second stage of our build will copy the extracted layers
11+ FROM openjdk:17-alpine
12+ WORKDIR application
13+ COPY --from=builder application/dependencies/ ./
14+ COPY --from=builder application/spring-boot-loader/ ./
15+ COPY --from=builder application/snapshot-dependencies/ ./
16+ COPY --from=builder application/application/ ./
17+ ENTRYPOINT ["java" , "org.springframework.boot.loader.JarLauncher" ]
You can’t perform that action at this time.
0 commit comments