pig/pig-auth/Dockerfile

20 lines
626 B
Docker
Raw Normal View History

FROM moxm/java:1.8-full as builder
WORKDIR /build
ARG JAR_FILE=target/pig-auth.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
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
WORKDIR pig-auth
2019-02-01 21:06:59 +08:00
COPY --from=builder /build/dependencies/ ./
COPY --from=builder /build/snapshot-dependencies/ ./
COPY --from=builder /build/spring-boot-loader/ ./
COPY --from=builder /build/application/ ./
2019-02-01 21:06:59 +08:00
EXPOSE 3000
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher