Files
2026-06-12 20:18:23 +08:00

26 lines
546 B
Docker
Raw Permalink 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 python:3.10-slim
# 系统依赖python-magic 需要 libmagic验证码需要清晰字体
RUN apt-get update && \
apt-get install -y --no-install-recommends libmagic1 fonts-dejavu-core && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 先复制依赖文件,利用 Docker 缓存
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 启动脚本加执行权限
RUN chmod +x start.sh
# 创建默认上传目录
RUN mkdir -p /app/uploads
EXPOSE 5000
CMD ["./start.sh"]