2016-11-02 3 views
1

방금 ​​가상 컴퓨터에 도커를 설치하고 우분투 컨테이너를 만들었습니다. "apt update"를 실행하면 다음 오류가 발생합니다. 도커 컨테이너에 인터넷에 액세스 할 수 없음

Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease 
Temporary failure resolving 'archive.ubuntu.com' 
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease 
Temporary failure resolving 'archive.ubuntu.com' 
Err:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease 
Temporary failure resolving 'archive.ubuntu.com' 
Reading package lists... Done   
Building dependency tree  
Reading state information... Done 
All packages are up to date. 
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com' 
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com' 
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'archive.ubuntu.com' 
W: Some index files failed to download. They have been ignored, or old ones used instead. 

는 이미 구글의 DNS 다시 시작 고정 표시기를 사용하는의/etc/기본/고정 표시기에서 DOCKER_OPTS 수 있도록 시도했지만 작동하지 않았다.

pkill docker 
iptables -t nat -F 
ifconfig docker0 down 
brctl delbr docker0 
docker -d 

가 어떻게이 문제를 해결할 수 :

나는 또한이 시도?

+0

'DOCKER_OPTS'에 정확히 어떤 변경을 했습니까? 변경 사항이 어떻게 유효했는지 어떻게 확인 했습니까? 'ps '를 사용하여 Docker 데몬이 설정 한 옵션으로 실행되고 있는지 확인하고, 컨테이너 내부의'/ etc/resolv.conf'를보고'nameserver' 설정이 올바른지 확인하십시오. – larsks

답변

2

이미 해결되었습니다. 내가 한 것은 /etc/NetworkManager/NetworkManager.conf에있는

dns=dnsmasq 

항목을 주석했다.