Docker中使用pip2遇到proxy问题的解决(Can't install pip packages inside a docker container)
2015-12-09 07:02
816 查看
遇到问题如下:
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/python-dotenv/
解决方案亲测成功:
Adding Google DNS to your local config
Modifying /etc/resolv.conf and adding the following lines at the end# Google IPv4 nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4
If you want to add other DNS servers, have a look here.
However this change won't be permanent (see this
thread). To make it permanent :
$ sudo nano /etc/dhcp/dhclient.confUncomment and edit the line with prepend domain-name-server :
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
Restart dhclient :
$ sudo dhclient.
解决方案引用至:http://stackoverflow.com/questions/28668180/cant-install-pip-packages-inside-a-docker-container-with-ubuntu
相关文章推荐
- Docker介绍以及Registry的安装 -摘自http://dockone.io/article/108
- 怎么从docker中copy文件到 本机
- 【docker】 windows 7 dockertoolbox 1.9 安装
- How to Install Docker on Ubuntu 14.04 LTS
- How to Install Docker on Ubuntu 14.04 LTS
- docker-image container 基本操作 -常用命令
- docker的例子
- Docker Machine, Compose, and Swarm: How They Work Together
- centos7安装docker
- docker certificates
- Windows 上安装docker
- 大数据平台安装测试(1)centos7.1 docker mesos tachyon hadoop (myriad? yarn?)spark hbase speaksql 选型分析
- docker-ovs遇到的问题以及解决办法
- ovs-dkcker 转载
- docker使用ovs跨主机互联
- Docker 使用openvswitch 跨主机互联转载螃蟹博客
- 自已创建Docker Base Image
- docker centos7 安装ssh
- docker centos7 源码安装MySQL-5.7
- Docker日志自动化: ElasticSearch、Logstash、Kibana以及Logspout