claude / Dockerfile
yangtb2024's picture
feat: 初始化反向代理项目
bd7bd10
raw
history blame contribute delete
508 Bytes
# 使用官方 Python 镜像作为基础镜像
FROM python:3.9-slim
# 设置工作目录
WORKDIR /app
# 复制依赖文件并安装依赖
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# 复制应用代码到工作目录
COPY . .
# 暴露 FastAPI 应用运行的端口 (与 README.md 中的 app_port 一致)
EXPOSE 7860
# 运行应用的命令
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]