Files
etf/Dockerfile
aszerW fb2f814111 feat(docker): 优化镜像支持中文字体及调度运行模式
- 基础镜像中添加多款中文字体,支持中文显示
- 主镜像安装中文字体并设置上海时区环境变量
- Dockerfile中创建日志目录并修改默认启动命令为定时调用调度器脚本
- 构建脚本支持动态镜像名,自动构建基础镜像,完善运行容器示例
- docker-compose修改为仅启动调度器服务,挂载相关配置、密钥、数据和日志目录
- 依赖更新,丰富金融数据、技术分析、绘图、机器学习及环境变量支持库
- 调度脚本参数调整,支持立即运行并退出及非后台模式运行切换
- 报告绘图中优先使用基础镜像预装的中文字体配置,提高字体兼容性和显示效果
2026-03-19 22:53:06 +08:00

29 lines
682 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-microhei \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
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"]