web-backend/Dockerfile
2025-01-03 15:41:14 +08:00

18 lines
379 B
Docker

FROM python:3.12
# 设置工作目录
WORKDIR /app
# 将当前目录内容复制到位于容器的/app目录下
COPY . /app
# 安装依赖
RUN pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
RUN pip install --no-cache-dir -r requirements.txt
# 暴露容器的端口
EXPOSE 8000
# 在容器启动时运行app.py
CMD ["python", "main.py"]