오늘 docker로 redis 환경을 설정할 때 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.#🎜 🎜#testwget
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo결과 오류
unknown host mirrors.163.com테스트 핑
在容器内部 ping www.baidu.com결과가 여전히 실패함
ping: unknown host www.baidu.com터미널을 하나 더 열고 호스트(컨테이너 아님)에 들어가서 ping 명령 테스트를 해보니 기본적으로 네트워크 문제가 아닌 도커 문제로 판단됩니다
솔루션 모든 컨테이너를 중지하고 docker를 다시 시작합니다
service docker restart더 많은 관련 튜토리얼을 보려면 PHP 중국어 웹사이트를 참고하세요
위 내용은 도커 컨테이너가 외부 네트워크를 ping할 수 없습니다.의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!