Dockerfile 295 B

12345678910111213
  1. FROM python:3.11-slim
  2. WORKDIR /app
  3. COPY requirements.txt .
  4. RUN pip install --no-cache-dir -r requirements.txt
  5. COPY . .
  6. EXPOSE 8100
  7. # 使用 waitress 运行 Flask 应用,监听 8100 端口
  8. CMD ["python", "-m", "waitress", "--host", "0.0.0.0", "--port", "8100", "--threads", "8", "app:app"]