亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網
    最全最豐富的資訊網站

    docker容器無法ping通外網怎么解決

    docker容器無法ping通外網怎么解決

    問題描述:

    今天在docker搭建redis環(huán)境的時候,發(fā)現(xiàn)yum拉取不到資源,上不到網,報了如下錯誤:

    http://mirrors.aliyun.com/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'" Trying other mirror. http://mirrors.neusoft.edu.cn/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.neusoft.edu.cn'" Trying other mirror. http://mirrors.nwsuaf.edu.cn/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.nwsuaf.edu.cn'" Trying other mirror. http://mirrors.shu.edu.cn/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.shu.edu.cn'" Trying other mirror. http://mirrors.sohu.com/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.sohu.com'" Trying other mirror. http://mirrors.tuna.tsinghua.edu.cn/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tuna.tsinghua.edu.cn'" Trying other mirror. http://mirrors.zju.edu.cn/centos/6.10/extras/x86_64/Packages/epel-release-6-8.noarch.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.zju.edu.cn'" Trying other mirror.

    解決過程:

    1、測試wget

    wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

    結果報錯

    unknown host mirrors.163.com

    2、測試ping

    在容器內部

    ping www.baidu.com

    結果還是失敗

    ping: unknown host www.baidu.com

    多開一個終端,進入主機(不是進入容器),進行ping命令測試發(fā)現(xiàn)是OK的,基本可以確定是docker的問題了,而不是網絡問題。

    解決方法:

    停止所有容器,重啟docker即可。

    service docker restart

    完成!

    推薦教程:docker教程

    贊(0)
    分享到: 更多 (0)
    網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號