Created
April 30, 2021 10:07
-
-
Save devlifeX/ae7d4303f1002a68f7710a255f7d3d79 to your computer and use it in GitHub Desktop.
Docker proxy ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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