[root@ip-172-31-21-105 ~]# docker run -it ubuntu /bin/bash
root@98377a50f0b0:/# ping www.baidu.com
bash: ping: command not found

 

root@98377a50f0b0:~# ifconfig
bash: ifconfig: command not found

解决方法:

apt-get update

apt install iputils-ping

apt install net-tools

 

相关文章: