Docker for Mac and corporate proxy

  docker, docker-for-mac, macos-catalina, proxy

I spent the whole day trying to pull an image on my MacBook through a corporate HTTP proxy, with no luck.
It is an authenticated proxy, of the form: http://username:[email protected]:8080
The http_proxy and https_proxy variables are set in my .zshrc.
The proxy details are set in the system’s preferences.

When I try to docker pull hello-world without altering proxy settings in the Docker for Mac UI, I got:

Error response from daemon: Get Service Unavailable

When I also set the proxy through the Docker for Mac UI I got:

Error response from daemon: Get Proxy Authentication Required

I can curl directly on the terminal, and get back a 200.

I tried with and without URI encoding the special characters in my password, doesn’t change a thing.
I used to have some issues with the same proxy on a Linux machine, but got it to work by messing with systemd. On macOs, I don’t know if I can do something similar.

Help would be very much appreciated.

Thanks in advance !

Source: Docker Questions