我是菜🐟我的记忆只有七秒
遇到的问题,找了半天,记录一下,不然下次🐟又要重新搜。
参考资料:
Docker ubuntn 使用apt-get update报错
ubuntu 20.04 设置DNS
解决docker 容器内部无法使用ping命令,报错ping command not found的问题
问题描述
运行多个容器时,本来之前浏览器发http请求是可以的,突然显示连不上了
意识到可能是容器之间的通信出了问题,就想进一个容器ping一下测试一下,结果先是报错 ping: not found,于是先执行 apt-get update 结果又报错:
root@c219c6dd66a6:/app# apt-get update
Ign:1 http://mirrors.ustc.edu.cn/ubuntu xenial InRelease
Ign:2 http://mirrors.ustc.edu.cn/ubuntu xenial-security InRelease
Ign:3 http://mirrors.ustc.edu.cn/ubuntu xenial-updates InRelease
Ign:4 http://mirrors.ustc.edu.cn/ubuntu xenial-proposed InRelease
Ign:5 http://mirrors.ustc.edu.cn/ubuntu xenial-backports InRelease
Ign:1 http://mirrors.ustc.edu.cn/ubuntu xenial InRelease
Ign:2 http://mirrors.ustc.edu.cn/ubuntu xenial-security InRelease
Ign:3 http://mirrors.ustc.edu.cn/ubuntu xenial-updates InRelease
Ign:4 http://mirrors.ustc.edu.cn/ubuntu xenial-proposed InRelease
Ign:5 http://mirrors.ustc.edu.cn/ubuntu xenial-backports InRele