Skip to content

Instantly share code, notes, and snippets.

@jinweijie
Last active January 22, 2022 14:27
Show Gist options
  • Save jinweijie/670931ad8f874ce5ef16e81a1579144d to your computer and use it in GitHub Desktop.
Save jinweijie/670931ad8f874ce5ef16e81a1579144d to your computer and use it in GitHub Desktop.
Set proxy for Docker to run minikube.
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