1 构建应用 #FROM openjdk:8 FROM openjdk:8-jdk-alpine COPY smart-main.jar /usr/local/smart-main.jar EXPOSE 8080 21 ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Duser.timezone=Asia/Shanghai", "-jar", "/usr/local/smart-main.jar"]
2
FROM jokerpomc/jre_unlimited:8 MAINTAINER lwm@qq.com RUN mkdir -p /smart/gateway WORKDIR /smart/gateway EXPOSE 9000 ADD ./target/smart-gateway.jar app.jar ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Duser.timezone=Asia/Shanghai", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"]