docker环境下安装相关网络命令

操作环境:Docker 下的Fedora release 32
因很多Docker环境下的操作系统都没有安装网络命令,有时候很不方便:

[root@62895cb1fc1b /]# netstat
bash: netstat: command not found
[root@62895cb1fc1b /]# route
bash: route: command not found
[root@62895cb1fc1b /]# ping 
bash: ping: command not found
[root@62895cb1fc1b /]# ifconfig
bash: ifconfig: command not found
[root@62895cb1fc1b /]# nslookup
bash: nslookup: command not found
[root@62895cb1fc1b /]# dig
bash: dig: command not found
[root@62895cb1fc1b /]# ip 
bash: ip: command not found

整理对应的安装包如下:

dnsutils: nslookup,dig
net-tools:  netstat,route,ifconfig
iputils:  ping 
telnet:  telnet
ftp:  ftp
iproute:  ip
tcpdump:  tcpdump
netsniff-ng:   netsniff-ng

其它常用命令补充:

procps:  ps
sysstat:  sar,iostat
sos:  sosreport

猜你喜欢

转载自blog.csdn.net/szuwangjl/article/details/107729872