[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
本文介绍在Docker的Ubuntu容器中遇到无法使用Ping和Ifconfig命令的问题及解决方案。通过运行Apt-get更新软件包列表,并安装Iputils-ping和Net-tools,成功在Docker环境中配置了网络诊断工具。
4158





