bobocup commited on
Commit
b761b3b
·
verified ·
1 Parent(s): bcb86dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -2,6 +2,12 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /code
4
 
 
 
 
 
 
 
5
  # 复制依赖文件
6
  COPY requirements.txt .
7
 
@@ -11,8 +17,5 @@ RUN pip install -r requirements.txt
11
  # 复制脚本文件
12
  COPY monitor_ip.py .
13
 
14
- # 更改 /code 目录的权限
15
- RUN chmod -R 777 /code
16
-
17
  # 运行脚本
18
  CMD ["python", "monitor_ip.py"]
 
2
 
3
  WORKDIR /code
4
 
5
+ # 安装必要的网络工具
6
+ RUN apt-get update && apt-get install -y \
7
+ curl \
8
+ iproute2 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
  # 复制依赖文件
12
  COPY requirements.txt .
13
 
 
17
  # 复制脚本文件
18
  COPY monitor_ip.py .
19
 
 
 
 
20
  # 运行脚本
21
  CMD ["python", "monitor_ip.py"]