bobocup commited on
Commit
b5fe80d
·
verified ·
1 Parent(s): 9663e7e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -1
Dockerfile CHANGED
@@ -1,2 +1,15 @@
1
- COPY monitor_ip.py /code/
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  CMD ["python", "monitor_ip.py"]
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # 复制依赖文件
6
+ COPY requirements.txt .
7
+
8
+ # 安装依赖
9
+ RUN pip install -r requirements.txt
10
+
11
+ # 复制脚本文件
12
+ COPY monitor_ip.py .
13
+
14
+ # 运行脚本
15
  CMD ["python", "monitor_ip.py"]