File size: 413 Bytes
66ed197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 使用官方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"]