first commit
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 使用基础镜像(根据需要选择合适的版本)
|
||||
FROM debian:bullseye-slim # 或 ubuntu:22.04
|
||||
|
||||
# 设置非交互模式,避免安装过程中出现交互提示
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 更新软件源并安装iproute2,同时清理缓存减小镜像体积
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
iproute2 \ # 包含ip命令的工具包
|
||||
&& \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 可选:设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 可选:添加启动命令
|
||||
CMD ["bash"]
|
||||
|
||||
Reference in New Issue
Block a user