Docker proxy setting ubuntu 14.04
問題:如果在公司上網的時候,公司設定了proxy,在執行安裝完docker後,想run一下hello world,則會出現
odl@ubuntu:~$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
docker: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy..
解決方法:
以下是對於Ubuntu 系統,而對於Centos 是 /etc/sysconfig/docker
sudo vi /etc/default/docker
add this two line to this file:
export http_proxy="http://proxy.esl.example.com:80/"
export https_proxy="https://proxy.esl.example.com:80/"
重啟docker: sudo service docker restart
結果:
odl@ubuntu:~$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
相關文章
- ubuntu 14.04 install docker latest dockerUbuntuDocker
- Ubuntu 14.04 LTS 安裝DockerUbuntuDocker
- 在 Ubuntu 14.04 下使用 cgroups 和 DockerUbuntuDocker
- ubuntu14.04環境安裝docker體驗UbuntuDocker
- Ubuntu14.04搭建LAMPUbuntuLAMP
- Ubuntu14.04搭建LNMPUbuntuLNMP
- Flask 安裝 Ubuntu 14.04FlaskUbuntu
- docker – nginx – proxy_pass + proxy_redirectDockerNginx
- 在 Ubuntu 14.04 上安裝 Ubuntu Tweak 0.8.8Ubuntu
- Ubuntu apt-get proxyUbuntuapt-get
- Ubuntu 14.04 下安裝 OpenCVUbuntuOpenCV
- Ubuntu14.04安裝JDKUbuntuJDK
- Install Composer on Ubuntu 14.04Ubuntu
- Ubuntu 14.04 安裝 JDK 7.0UbuntuJDK
- ubuntu14.04下navicat破解方法Ubuntu
- How To Install Vagrant IN Ubuntu14.04Ubuntu
- Ubuntu14.04下安裝genymotionUbuntu
- Ubuntu 14.04下NFS安裝配置UbuntuNFS
- install redis and used in golang on ubuntu 14.04RedisGolangUbuntu
- Ubuntu 14.04環境變數修改Ubuntu變數
- Ubuntu安裝mysql-proxyUbuntuMySql
- ubuntu14.04 升級gcc的方法UbuntuGC
- Ubuntu14.04下Dipy包安裝Ubuntu
- Ubuntu14.04安裝postgresql9.4UbuntuSQL
- ubuntu 14.04 安裝cuda 7.5/CUDA 8.0Ubuntu
- 五個 Ubuntu 14.04 最佳圖示集Ubuntu
- ubuntu14.04 建立ftp伺服器UbuntuFTP伺服器
- ubuntu14.04配置開發環境Ubuntu開發環境
- Ubuntu14.04 LTS下安裝jdkUbuntuJDK
- Ubuntu14.04安裝Pycharm4.5.3UbuntuPyCharm
- 在Ubuntu14.04上快速部署OpenStackUbuntu
- Ubuntu 每日技巧- 自動備份Ubuntu 14.04到Box雲存Ubuntu
- Ubuntu14.04 安裝搜狗輸入法Ubuntu
- 在ubuntu14.04上配置SNMPv3Ubuntu
- 在 Ubuntu 14.04 下安裝 mysql 5.7.10UbuntuMySql
- Ubuntu14.04下MRtrix3安裝Ubuntu
- I.MX6ubuntu-core-14.04ApachephpmysqlQt5UbuntuApachePHPMySqlQT
- Ubuntu14.04上安裝pip的方法Ubuntu