If the Docker-machine behind the corporate proxy:
Linux (Ubuntu, Debian):
sudo mkdir -p /etc/systemd/system/docker.service.d
cd /etc/systemd/system/docker.service.d/
sudo touch http-proxy.conf
sudo nano http-proxy.conf
# copy and paste in the file:
[Service]
Environment="HTTP_PROXY=http://<PROXYIP>:3128"
Environment="HTTPS_PROXY=http://<PROXYIP>:3128"
Environment="NO_PROXY=localhost,192.168.1.0/16,10.*.*.*"
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl show --property=Environment docker
Windows:
Update environment variable using Powershell (with admin rights):
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://<PROXYIP>:3128", [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://<PROXYIP>:3128", [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("NO_PROXY", "192.168.*.*, 172.24.*.*, 172.25.*.*, 10.*.*.*, localhost, 127.0.0.1, 0.0.0.0/8", [EnvironmentVariableTarget]::Machine)
Restart-Service docker