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 下安裝 OpenCVUbuntuOpenCV
- ubuntu14.04 升級gcc的方法UbuntuGC
- 在 Ubuntu 14.04 下安裝 mysql 5.7.10UbuntuMySql
- 在ubuntu14.04上配置SNMPv3Ubuntu
- Ubuntu (14.04)下執行 DotNet Core 步驟Ubuntu
- Ubuntu14.04 安裝搜狗輸入法Ubuntu
- Ubuntu 每日技巧- 自動備份Ubuntu 14.04到Box雲存Ubuntu
- Ubuntu apt-get proxyUbuntuapt-get
- Ubuntu14.04 Server 升級到14.10 的方法UbuntuServer
- Drupal7核心安裝篇-Ubuntu 14.04 LTSUbuntu
- docker – nginx – proxy_pass + proxy_redirectDockerNginx
- Ubuntu安裝mysql-proxyUbuntuMySql
- Ubuntu 14.04 即將結束支援,你該怎麼辦?Ubuntu
- 詳解ubuntu14.04如何設定靜態IP的方法Ubuntu
- win10遠端登入Ubuntu14.04圖形化介面Win10Ubuntu
- ubuntu14.04安裝cuda7.5(包含顯示卡驅動)Ubuntu
- Nginx proxy manager反向代理docker hubNginxDocker
- Canonical公佈Ubuntu 14.04 LTS的擴充套件安全維護專案Ubuntu套件
- 在Ubuntu 14.04上備份,還原和遷移MongoDB資料庫UbuntuMongoDB資料庫
- ubuntu安裝dockerUbuntuDocker
- ubuntu 安裝 dockerUbuntuDocker
- Ubuntu Docker 安裝UbuntuDocker
- 運維除錯記錄:Ubuntu14.04下部署Opendaylight Nitrogen叢集運維除錯Ubuntu
- Ubuntu 安裝最新 docker docker-composeUbuntuDocker
- Ubuntu安裝Docker及Docker-composeUbuntuDocker
- Ubuntu14.04下編譯Android8.1.0原始碼並刷入到裝置Ubuntu編譯Android原始碼
- Ubuntu 安裝 Docker DesktopUbuntuDocker
- 【ubuntu】22.04安裝dockerUbuntuDocker
- ubuntu 18.04 安裝dockerUbuntuDocker
- Ubuntu 安裝 docker[laradock]UbuntuDocker
- Ubuntu中安裝DockerUbuntuDocker
- Tool-Docker-Ubuntu18.04DockerUbuntu
- setting.xmlXML
- 阿里雲setting阿里
- Install Docker CE for Ubuntu 18.04 LTSDockerUbuntu
- Ubuntu安裝docker筆記UbuntuDocker筆記
- ubuntu18.04 安裝dockerUbuntuDocker
- Ubuntu安裝nvidia-dockerUbuntuDocker
- Macos自定義Docker Ubuntu映象MacDockerUbuntu