tianlong12 commited on
Commit
66ed197
·
verified ·
1 Parent(s): 624c98b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方Python 3.9 slim版镜像作为基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 设置工作目录为 /app
5
+ WORKDIR /app
6
+
7
+ # 将当前目录的内容复制到工作目录中
8
+ COPY . /app
9
+
10
+ # 安装Python依赖包
11
+ RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple aiohttp dataclasses
12
+
13
+ # 暴露应用运行的端口
14
+ EXPOSE 6666
15
+
16
+ # 定义容器启动时运行的命令
17
+ CMD ["python", "main.py"]