Last active
January 22, 2022 14:27
-
-
Save jinweijie/670931ad8f874ce5ef16e81a1579144d to your computer and use it in GitHub Desktop.
Set proxy for Docker to run minikube.
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 | |
sudo chmod 777 /etc/systemd/system/docker.service.d/proxy.conf | |
sudo echo ' | |
[Service] | |
Environment="HTTP_PROXY=http://127.0.0.1:7890/" | |
Environment="HTTPS_PROXY=http://127.0.0.1:7890/" | |
Environment="NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.39.0/24" | |
' >> /etc/systemd/system/docker.service.d/proxy.conf | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker | |
sudo systemctl show --property=Environment docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment