next-playground's picture
Update Dockerfile
fb8dcda verified
raw
history blame
407 Bytes
# 使用官方 Python 运行时作为父镜像
FROM python:3.10-slim
# 设置工作目录
WORKDIR /app
# 将代码复制到容器中
COPY . /app
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir gunicorn
# 提升权限
RUN chmod -R 755 .
# 暴露端口
EXPOSE 5000
# 运行应用程序
CMD ["gunicorn", "-b", "0.0.0.0:5000","--timeout", "300", "app:app"]