मैं किसी भी डॉकटर कंटेनर के अंदर इंटरनेट कनेक्शन की आवश्यकता वाले किसी भी कमांड को निष्पादित नहीं कर सकता।
काम करता है:
docker run ubuntu /bin/echo 'Hello world'
काम नहीं करता:
docker run ubuntu apt-get 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...
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'
इसी तरह pipऔर ping।
मैं Ubuntu 16.04 पर हूँ और फ़ायरवॉल या कॉर्पोरेट प्रॉक्सी सर्वर का उपयोग नहीं कर रहा हूँ और डॉकटर को पुनः आरंभ करने का प्रयास किया है।
युपीडी:
इंटरेक्टिव मोड में अपडेट उसी तरह से विफल हो जाता है।
docker exec -ti angry_goodall /bin/bash
apt-get update
#fails
ping google.com
#fails with "unknown host" message
ping 8.8.8.8
# shows PING 8.8.8.8 (8.8.8.8): 56 data bytes
# and than hangs indefinetly
sudo apt-get update मेजबान पर यानी मेरे कंप्यूटर पर डॉकटर के बाहर सफलतापूर्वक चलता है।
अद्यतन डॉकर संस्करण 1.12.1, 23cf638 का निर्माण करें
apt-get updateडॉकटर के साथ इंटरैक्टिव मोड में चल सकते हैं ?