2017-10-04 16 views
1

Gruß gescheitert,django Installation in runnung dockerfile auf ubuntu

Ich folgte dem Docker compose quickstart Beispiel bei https://docs.docker.com/compose/django/, meine Docker Umgebung in CentOS VM und Ubuntu VM verwenden. Das Beispiel funktioniert in CentOS, aber nicht in Ubuntu. Der Ausfall geschieht in

RUN pip install -r requirements.txt 

Der Fehler als

ist
Step 6/7 : RUN pip install -r requirements.txt 
---> Running in 7ed9830cea5f 
Collecting Django (from -r requirements.txt (line 1)) 
    Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe12ff70470>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ 
    Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe12ff70438>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ 
    Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe12ff706a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ 
    Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe12f4fe5f8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ 
    Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe12f4fea58>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/django/ 
    Could not find a version that satisfies the requirement Django (from -r requirements.txt (line 1)) (from versions:) 
No matching distribution found for Django (from -r requirements.txt (line 1)) 

Können Sie mir helfen, Probleme dieses Schießen, und zu verstehen, warum dies in Ubuntu passiert, aber nicht in CentOS?

Dank ...

Antwort

0

Run pip suchen und sicherstellen, was Sie suchen ist da. Sieht aus wie die Fehler es tatsächlich nicht finden können.

Docker-Dokumente sind auf der Hauptseite meist veraltet.

1

Es stellte sich heraus, meine /etc/resolv.conf zeigte auf einen falschen Nameserver. Ich muss noch untersuchen, warum das passiert. Wenn Sie den richtigen DNS manuell eingeben, verfügen die Andockcontainer über ein Netzwerk.