unis_crm/backend/Dockerfile

20 lines
449 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ============ 运行阶段 ============
FROM eclipse-temurin:17-jre
WORKDIR /app
# 依赖 com.unisbase 为内部 Maven 依赖,在镜像构建前由 CI/本地 Maven 构建产物
COPY target/unis-crm-backend-1.0.0-SNAPSHOT.jar app.jar
# 创建日志目录
RUN mkdir -p /app/logs
ENV TZ=Asia/Shanghai
EXPOSE 8080
# 默认使用 prod profile可通过环境变量覆盖
ENV SPRING_PROFILES_ACTIVE=prod
ENTRYPOINT ["java", "-jar", "app.jar"]