12345678910111213141516 |
- # 使用官方Python镜像作为基础镜像
- FROM python:3.10
- # 设置工作目录
- WORKDIR /app
- # 复制依赖文件到容器中
- COPY requirements.txt /app/
- RUN pip install --no-cache-dir -r requirements.txt
- # 复制你的项目文件到工作目录
- COPY . /app
- # 启动服务
- CMD ["hypercorn", "async_app:app", "--config", "hypercorn_config.toml"]
|