FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 安装 gunicorn 用于生产环境运行 Flask RUN pip install --no-cache-dir gunicorn COPY . . EXPOSE 8888 CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8888", "app:app"]