halo/Dockerfile

27 lines
914 B
Docker
Raw Permalink Normal View History

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