halo/Dockerfile

23 lines
779 B
Docker
Raw Normal View History

2022-07-12 03:01:00 +00:00
FROM eclipse-temurin:17-jre as builder
WORKDIR application
2022-07-12 03:01:00 +00:00
ARG JAR_FILE=build/libs/halo-*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract
2018-10-17 22:04:06 +00:00
################################
2022-07-12 03:01:00 +00:00
FROM eclipse-temurin:17-jre
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
2022-07-12 03:01:00 +00:00
ENV JVM_OPTS="-Xmx256m -Xms256m" \
TZ=Asia/Shanghai
2018-10-17 22:04:06 +00:00
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone
2019-05-07 09:27:49 +00:00
2022-07-12 03:01:00 +00:00
ENTRYPOINT java ${JVM_OPTS} -Djava.security.egd=file:/dev/./urandom org.springframework.boot.loader.JarLauncher