This commit is contained in:
2026-06-12 14:27:19 +08:00
commit d8dccfc04c
12 changed files with 1796 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
FROM python:3.10-slim
# 系统依赖python-magic 需要 libmagic
RUN apt-get update && \
apt-get install -y --no-install-recommends libmagic1 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 先复制依赖文件,利用 Docker 缓存
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建默认上传目录
RUN mkdir -p /app/uploads
EXPOSE 5000
CMD ["python3", "app.py"]