Tuesday, August 22, 2017

Configure docker to use socks5 proxy

First create configuration folder for docker's systemd service:
 mkdir -p /etc/systemd/system/docker.service.d  

Then create the configuration file with the name http-proxy.conf and put these contents there:
 [Service]  
 Environment="all_proxy=socks5://127.0.0.1:7777"  
 Environment="NO_PROXY=localhost,127.0.0.1,private.docker.registry.com"  

Apply it:
 systemctl daemon-reload  
 systemctl restart docker  

No comments:

Post a Comment