DEV Community

GaMa
GaMa

Posted on

Setting Docker proxy in Ubuntu

sudo gedit /etc/systemd/system/docker.service.d/proxy.conf

[Service]
Environment="HTTP_PROXY=http://user:pass@address:port/"
Environment="HTTPS_PROXY=http://user:pass@address:port/"

sudo gedit /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://user:pass@address:port/"

sudo gedit /etc/systemd/system/docker.service.d/https-proxy.conf

[Service]
Environment="HTTPS_PROXY=http://user:pass@address:port/"

sudo systemctl daemon-reload
sudo systemctl restart docker.service

Top comments (0)