How are Docker Desktop proxy settings on Windows propagated to Docker?

I am on a corporate Windows laptop and I want to start experimenting with Docker. Being a corporate machine, everything needs to go through the corporate proxy.

I installed Debian on WSL and then the Docker Desktop, which installed its components on the Debian WSL VM. My first priority however was to test docker on WSL directly and not through Docker Desktop. So I set to read the Docker docs and download the docker/getting-started image through the Debian terminal. That, however, failed due to not using the network proxy.

Desktop Docker docs state that setting the proxy settings on Docker Desktop will propagate the proxy settings to Docker itself. Indeed, I set the proxy settings on Docker Desktop, and I was now able to properly download my image from inside Debian.

Since I want to have full control of Docker through the Debian terminal and not Docker Desktop, I want to understand in which way the proxy settings propagate to Docker inside WSL. I imagined that Docker Desktop altered some configuration file inside Debian, but a grep on the whole system of the proxy ip got me nothing.
please advise

If I understand you well, you didn’t just install Docker Desktop, but installed a Debian WSL2 distribution and then turned on the WSL2 intergation in Docker Desktop. When you do that, Docker will still run in an other WSL distribution, you just get a remote client in the Debian.

If you need full control, then is there any reason you want to have Docker Desktop? It has its great advantages, but it doesn’t give you full control. If you want to use WSL, then you can just install Docker in the WSL distribution you have chosen and deal with some problems like colliding network ranges, since Docker uses the same network range as WSL.You can’t really change the network of WSL, but you can change the network settings of Docker. The other differene would be that you would need to run service docker start every time you restart your WSL distribution, since WSL doesn’t have systemd to automatically start Docker for you.

If you use a terminal to run the docker commands, I can higly recommend Windows-Terminal on Windows 10/11, which allows to configure all aspects your heart desires.