#------------------- WORKS FOR DEBIAN DISTROS ---------------------
# First create this directory
sudo mkdir -p /etc/systemd/system/docker.service.d
# Create config file
sudo nano /etc/systemd/system/docker.service.d/proxy.conf
# Add the content below to match your environment variables
[Service]
Environment="HTTP_PROXY=http://myproxy.hostname:8080"
Environment="HTTPS_PROXY=https://myproxy.hostname:8080/" # Depending on your net use the http(s)://
Environment="NO_PROXY="localhost,127.0.0.1,::1"
# Close your edtor
# Reload your daemon
sudo systemctl daemon-reload
# Reload docker service
sudo systemctl restart docker.service
#export http_proxy="http://127.0.0.1:3128/"