pig/pig-upms/pig-upms-biz/Dockerfile
let-go 4af0b1aa89 🐳 Work about Docker. 优化分层镜像的 Base FROM 镜像
🔖 🔖 🔖 Releasing / Version tags. 2.10.0

 Introducing new features. support docker layer image
2020-10-04 16:04:16 +08:00

19 lines
626 B
Docker

FROM moxm/java:1.8-full as builder
WORKDIR /build
ARG JAR_FILE=target/pig-upms-biz.jar
COPY ${JAR_FILE} app.jar
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
FROM moxm/java:1.8-full
LABEL maintainer="jclazz@outlook.com"
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
WORKDIR pig-upms
COPY --from=builder /build/dependencies/ ./
COPY --from=builder /build/snapshot-dependencies/ ./
COPY --from=builder /build/spring-boot-loader/ ./
COPY --from=builder /build/application/ ./
EXPOSE 4000
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher