Files
UserclassService/docker/Dockerfile
T

21 lines
862 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BschClass 后端镜像(基于已构建好的 target/BschClass-0.1.jar)
# 构建上下文 = 仓库根目录: docker build -f docker/Dockerfile -t <img> .
FROM eclipse-temurin:8-jre
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl tzdata \
&& ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY target/BschClass-0.1.jar /app/BschClass-0.1.jar
# 镜像内 application-prod.yml 仅作独立运行时的兜底默认;
# projman 部署时平台配置档案会以 bind mount 覆盖同路径文件,环境变量再压过文件。
COPY docker/application-prod.yml /app/config/application-prod.yml
COPY docker/run-app.sh /app/run-app.sh
RUN chmod +x /app/run-app.sh && mkdir -p /data/upload
EXPOSE 8087
ENTRYPOINT ["/app/run-app.sh"]