Dockerfile 466 B

123456789101112131415
  1. # 指定基础镜像
  2. FROM openjdk:8
  3. ADD hanghui-outapi-platform.jar /opt/hanghui-outapi-platform.jar
  4. #ADD lib /opt/lib
  5. #ADD resources /opt/resources
  6. # 镜像暴露的端口
  7. EXPOSE 8000
  8. ###容器启动命令 $PARAMS可以进行docker run传参
  9. ENTRYPOINT ["sh","-c"," java $PARAMS -Dproject-name=hanghui -jar /opt/hanghui-outapi-platform.jar "]
  10. # 设置时区
  11. # RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone