FROM openjdk:8-jre
ENV TZ=Asia/Shanghai
# 执行指令，新建一个文件夹
RUN mkdir -p /apps
# 将新建的文件夹作为工作目录
WORKDIR /apps
# 说明容器开放的端口
EXPOSE 8202
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./target/baogutang-admin-1.0.0-SNAPSHOT.jar ./baogutang-admin-1.0.0-SNAPSHOT.jar
ENTRYPOINT ["java", "-server", "-Dfile.encoding=utf-8", "-Xms256m", "-Xmx512m", "-jar", "-Dserver.port=8202", "-Dspring.profiles.active=prod", "baogutang-admin-1.0.0-SNAPSHOT.jar"]
