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"]