1.現象:
在容器內執行route命令會報錯 bash: route: command not found
2.原因
容器內沒有安裝route命令
3.解決辦法
(1)bash: ip: command not found
apt-get update && apt-get install -y iproute2
(2)bash: yum: command not found
apt-get update && apt-get install yum
(3)bash: ping: command not found
apt-get update && apt install iputils-ping
(4)bash: ifconfig: command not found
apt-get update && apt install net-tools
(5)bash: vi: command not found
apt-get update && apt-get install vim
(6)bash: route: command not found
apt-get update && apt-get install -y iproute2 && apt-get update && apt install net-tools
(7) bash: netstat: command not found
apt-get update && apt install net-tools
(8)bash: ps: command not found
apt-get update && apt-get install procps
(9)bash: top: command not found
apt-get update && apt-get install procps