docker技巧

docker的pull代理步骤

root@moneyslow.com:~# mkdir -p /etc/systemd/system/docker.service.d
http代理:

root@moneyslow.com:~# vi /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment=”HTTP_PROXY=192.168.11.202:1080″
https代理:

root@moneyslow.com:~# vi /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment=”HTTPS_PROXY=192.168.11.202:1080″
重启docker:

root@moneyslow.com:~# systemctl daemon-reload
root@moneyslow.com:~# systemctl restart docker

然后再pull速度就快了。