Update Dockerfile
Browse files- Dockerfile +14 -1
Dockerfile
CHANGED
|
@@ -1,2 +1,15 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|