Files
etf/Dockerfile
aszerW e26db9767f fix(docker): 优化中文字体安装及清理缓存
- 将中文字体从 wqy-microhei 改为 wqy-zenhei,提高字体兼容性
- 清理 matplotlib 缓存文件,减少镜像体积
- 更新报告图表中文字体设置,兼容 macOS 和 Linux
- 简化字体配置,避免多余字体加载
2026-03-24 00:41:03 +08:00

30 lines
689 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.

FROM index-base:latest
# 设置工作目录
WORKDIR /app
# 安装中文字体
RUN apt-get update && apt-get install -y --no-install-recommends \
fonts-wqy-zenhei \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ~/.cache/matplotlib
# 复制依赖文件
COPY requirements.txt .
RUN uv pip install --system -r requirements.txt
# 仅复制除 data 目录外的应用代码, data 在 dockerignore 中已经被排除
COPY . .
# 创建日志目录
RUN mkdir -p /app/logs
# 设置时区为上海
ENV TZ=Asia/Shanghai
# 暴露端口如需Web服务
EXPOSE 80
# 运行定时任务调度器默认daemon模式
CMD ["python", "scripts/daily_scheduler.py", "--time", "09:00"]