2022-05-27 09:50:57 +00:00
|
|
|
FROM eclipse-temurin:11-jre as builder
|
2021-01-27 15:55:57 +00:00
|
|
|
WORKDIR application
|
2021-01-03 14:05:39 +00:00
|
|
|
ARG JAR_FILE=build/libs/*.jar
|
2021-01-27 15:55:57 +00:00
|
|
|
COPY ${JAR_FILE} application.jar
|
|
|
|
RUN java -Djarmode=layertools -jar application.jar extract
|
2018-10-17 22:04:06 +00:00
|
|
|
|
2021-01-27 15:55:57 +00:00
|
|
|
################################
|
2021-01-03 14:05:39 +00:00
|
|
|
|
2022-05-27 09:50:57 +00:00
|
|
|
FROM eclipse-temurin:11-jre
|
2021-01-27 15:55:57 +00:00
|
|
|
MAINTAINER johnniang <johnniang@fastmail.com>
|
|
|
|
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/ ./
|
2018-10-17 22:04:06 +00:00
|
|
|
|
2021-01-27 15:55:57 +00:00
|
|
|
# JVM_XMS and JVM_XMX configs deprecated for removal in halov1.4.4
|
|
|
|
ENV JVM_XMS="256m" \
|
|
|
|
JVM_XMX="256m" \
|
|
|
|
JVM_OPTS="-Xmx256m -Xms256m" \
|
|
|
|
TZ=Asia/Shanghai
|
2018-10-17 22:04:06 +00:00
|
|
|
|
2021-01-27 15:55:57 +00:00
|
|
|
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
|
|
&& echo $TZ > /etc/timezone
|
2019-05-07 09:27:49 +00:00
|
|
|
|
2022-05-27 09:50:57 +00:00
|
|
|
ENTRYPOINT java -Xms${JVM_XMS} -Xmx${JVM_XMX} ${JVM_OPTS} -Djava.security.egd=file:/dev/./urandom org.springframework.boot.loader.JarLauncher
|