Docker 代理设置

使用代理解决拉取 Docker Hub 镜像速度太慢问题,添加代理配置到 /etc/sysconfig/docker

1
2
3
4
5
HTTP_PROXY=http://<IP>:<Port>
http_proxy=$HTTP_PROXY
HTTPS_PROXY=$HTTP_PROXY
https_proxy=$HTTP_PROXY
export HTTP_PROXY HTTPS_PROXY http_proxy https_proxy

重启 Docker 服务:sudo service docker restart
测试:sudo docker search coreos

(完)