2016-11-02 9 views
1

私はちょうど仮想マシンにドッカーをインストールし、ubuntuコンテナを作成しました。私が "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. 

私はすでにGoogleのDNSおよび再起動ドッキングウィンドウを使用するには、/ etc/default /ドッキングウィンドウでDOCKER_OPTSを有効にしようとしたが、それはうまくいきませんでした。

また、私はこれを試してみました:

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

どのように私はこの問題を解決することができますか?

+0

「DOCKER_OPTS」にはどのような変更を加えましたか?あなたの変更が有効であることをどのように確認しましたか?あなたが設定したオプションでDockerデーモンが動作していることを 'ps'で確認し、コンテナ内の '/ etc/resolv.conf'を見て' nameserver'の設定が正しいかどうか確認してください。 – larsks

答えて

2

すでに解決済みです。私がしなければならなかったのは、/etc/NetworkManager/NetworkManager.confにある

dns=dnsmasq 

のエントリです。

関連する問題