Docker service behind proxy - Ubuntu
編輯 /etc/default/docker
把以下 export http_proxy 的那一行 unmark, 然後改成你的 proxy 設定  
1 | # Docker Upstart and SysVinit configuration file | 
2 | |
3 | # Customize location of Docker binary (especially for development testing). | 
4 | #DOCKER="/usr/local/bin/docker" | 
5 | |
6 | # Use DOCKER_OPTS to modify the daemon startup options. | 
7 | #DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4" | 
8 | |
9 | # If you need Docker to use an HTTP proxy, it can also be specified here. | 
10 | export http_proxy="http://127.0.0.1:3128/" | 
11 | |
12 | # This is also a handy place to tweak where Docker's temporary files go. | 
13 | #export TMPDIR="/mnt/bigdrive/docker-tmp" | 
重新啟動 docker service --- service docker restart
(如果你安裝的是 ubuntu 預設的 docker.io,指令就是 service docker.io restart)