Skip to content

Instantly share code, notes, and snippets.

@devlifeX
Created April 30, 2021 10:07
Show Gist options
  • Save devlifeX/ae7d4303f1002a68f7710a255f7d3d79 to your computer and use it in GitHub Desktop.
Save devlifeX/ae7d4303f1002a68f7710a255f7d3d79 to your computer and use it in GitHub Desktop.
Docker proxy ubuntu
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo touch /etc/systemd/system/docker.service.d/proxy.conf
echo '
[Service]
Environment="HTTP_PROXY=http://USERNAME:PASSWORD@IP:PORT"
Environment="NO_PROXY="localhost,127.0.0.1,::1"
' > /etc/systemd/system/docker.service.d/proxy.conf;
sudo systemctl daemon-reload
sudo systemctl restart docker.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment