zhuancla / Dockerfile
nbugs's picture
Create Dockerfile
05cca21 verified
raw
history blame
288 Bytes
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# 设置环境变量
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# 暴露端口
EXPOSE 7860
# 启动命令
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]