jar dockerfile

vi Dockerfile

FROM openjdk:10-jdk

#复制jar包到镜像中

COPY ./app.jar /app/app.jar

#时区设置

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN echo 'Asia/Shanghai' >/etc/timezone

#运行jar

CMD ["java","-jar","-Duser.timezone=GMT+8","/app/app.jar"]

posted @ 2020-09-09 17:03  冬天不眠  阅读(177)  评论(0编辑  收藏  举报