2023-09-26 14:55:59 +08:00
|
|
|
FROM eclipse-temurin:8-jre as builder
|
|
|
|
WORKDIR application
|
2023-09-26 22:44:29 +08:00
|
|
|
ARG JAR_FILE=backend/target/*.jar
|
2023-09-26 14:55:59 +08:00
|
|
|
COPY ${JAR_FILE} application.jar
|
|
|
|
RUN java -Djarmode=layertools -jar application.jar extract
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
FROM eclipse-temurin:8-jre
|
|
|
|
MAINTAINER li-guohao <git@liguohao.cn>
|
|
|
|
WORKDIR application
|
|
|
|
COPY --from=builder application/dependencies/ ./
|
|
|
|
COPY --from=builder application/spring-boot-loader/ ./
|
|
|
|
COPY --from=builder application/snapshot-dependencies/ ./
|
|
|
|
COPY --from=builder application/application/ ./
|
|
|
|
|
|
|
|
ENV JVM_OPTS="-Xmx256m -Xms256m" \
|
2023-09-26 15:32:02 +08:00
|
|
|
BLOSSOM_WORK_DIR="/home/bl" \
|
2023-09-26 16:29:02 +08:00
|
|
|
SPRING_CONFIG_LOCATION="optional:classpath:/;optional:classpath:/config/;optional:file:/home/bl/" \
|
2023-09-26 14:55:59 +08:00
|
|
|
TZ=Asia/Shanghai
|
|
|
|
|
|
|
|
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
|
|
&& echo $TZ > /etc/timezone
|
|
|
|
|
|
|
|
EXPOSE 9999
|
|
|
|
|
|
|
|
ENTRYPOINT ["sh", "-c", "java ${JVM_OPTS} org.springframework.boot.loader.JarLauncher ${0} ${@}"]
|