ip2 / Dockerfile
bobocup's picture
Update Dockerfile
6f65fdb verified
raw
history blame contribute delete
359 Bytes
FROM python:3.9-slim
WORKDIR /code
# 安装必要的网络工具
RUN apt-get update && apt-get install -y \
curl \
iproute2 \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装依赖
RUN pip install -r requirements.txt
# 复制脚本文件
COPY monitor_ip.py .
# 运行脚本
CMD ["python", "monitor_ip.py"]