Dockerfile 628 B

123456789101112
  1. FROM registry.cn-shanghai.aliyuncs.com/winhc-back/openjdk:8-jre-alpine3.9
  2. RUN echo "http://mirrors.aliyun.com/alpine/v3.9/main/" > /etc/apk/repositories \
  3. && echo "http://mirrors.aliyun.com/alpine/v3.9/community" >> /etc/apk/repositories \
  4. && apk add --no-cache procps curl bash tzdata \
  5. && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  6. && echo "Asia/Shanghai" > /etc/timezone
  7. VOLUME /tmp
  8. COPY target/*.jar app.jar
  9. EXPOSE 8080
  10. EXPOSE 8081
  11. ENV APP_OPTS=""
  12. ENTRYPOINT ["sh", "-c", "java -Duser.timezone=Asia/Shanghai -Djava.security.egd=file:/dev/./urandom -Dserver.port=8080 -jar /app.jar $APP_OPTS"]