django安装在ubuntu的runnung dockerfile失败
问候,
我跟着docker写了一个快速启动的例子https://docs.docker.com/compose/django/ ,在CentOS VM和Ubuntu VM中使用我的docker环境。 这个例子在CentOS中运行,但在Ubuntu中没有。 失败发生在
RUN pip install -r requirements.txt
错误是
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))
你可以帮我解决这个问题,并理解为什么会发生这种情况在Ubuntu,但不是在CentOS?
谢谢…
运行点子search,并确保你在找什么。 看起来像是从实际上找不到的错误。
Docker文档倾向于在主站点上过时。
原来,我的/etc/resolv.conf指向一个错误的名称服务器。 我仍然需要调查为什么发生。 如果手动把正确的DNS,docker集装箱有networking。
- 将Django Python应用程序放入Docker容器后获取404错误消息
- 如何运行与Docker的OpenEats(Django配方pipe理)?
- Django应用程序服务器挂起/不会在Docker Compose中启动
- Redis + Docker + Django – 错误111连接被拒绝
- Pycharm不显示来自django外部库的所有文件
- 在docker-compose中使用network_mode ='host'break run:主机typesnetworking不能与链接一起使用
- boot2docker,docker,在mac os上的django x
- 使用Webpack_Loader停滞Django
- Django泊坞窗退出代码0请求GET或POST