# 使用官方Python 3.9 slim版镜像作为基础镜像 FROM python:3.9-slim # 设置工作目录为 /app WORKDIR /app # 将当前目录的内容复制到工作目录中 COPY . /app # 安装Python依赖包 RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple aiohttp dataclasses # 暴露应用运行的端口 EXPOSE 6666 # 定义容器启动时运行的命令 CMD ["python", "main.py"]