Docker Proxy with SS

Docker Proxy with SS

Ubuntu 16.04, Docker 18.06.1-ce.

sudo apt-get install privoxy

在/etc/privoxy/config里添加:

forward-socks / 127.0.0.1:1080 #your ss port

啟動 privoxy

service privoxy start

privoxy 的默認埠是8118,然後按照 docker 官方教程進行設置,贅述如下

sudo mkdir -p /etc/systemd/system/docker.service.dsudo vim /etc/systemd/system/docker.service.d/http-proxy.conf#file content[Service]Environment="HTTP_PROXY=http://127.0.0.1:8118/"sudo vim /etc/systemd/system/docker.service.d/https-proxy.conf#file content[Service]Environment="HTTPS_PROXY=http://127.0.0.1:8118/"#flush changessudo systemctl daemon-reload#restart dockersudo systemctl restart docker#verifysystemctl show --property=Environment docker

推薦閱讀:

TAG:Docker | 計算機科學 | 科技 |