0

I'm, having trouble to set up my local dev environment. I want to use Docker Desktop in my Windows 10 machine behind a local CNTLM proxy.

My CNTLM Proxy works. This is the output after I start my CNTLM

0 [main] cntlm 17620 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to
the public mailing list [email protected]
section: global, Username = 'pd03056'
section: global, Domain = 'Provinzial'
section: global, Proxy = '192.168.10.10:80'
section: global, NoProxy = 'localhost, 127.0.0.*, 10.*, 192.168.*'
section: global, Listen = '0.0.0.0:3128'
Resolve 0.0.0.0:
  -> 0.0.0.0
cntlm: Proxy listening on 0.0.0.0:3128
Adding no-proxy for: 'localhost'
Adding no-proxy for: '127.0.0.*'
Adding no-proxy for: '10.*'
Adding no-proxy for: '192.168.*'
cntlm: Workstation name used: L00265511WP
cntlm: Using following NTLM hashes: NTLMv2(1) NT(0) LM(0)
Password:
cntlm: PID 17620: Cntlm ready, staying in the foreground

I confimed that this works from a local WSL instance doing a curl www.google.de. I have a local ~/.curlrc file pointing curl to my CNTLM.

$ more ~/.curlrc
-x 127.0.0.1:3128
cacert = /path/to/my/trusted-certs.pem

$ curl www.google.de
# I skip the whole output here ...
# The CNTLM log shows that it communicates with google.de
# and I ger the correct result in WSL

Now here is my problem ... My Docker Desktop installation (version 4.4.4 [73704]) should use this proxy as well. I configured Docker Desktop to do so by putting http://host.docker.internal:3128 as HTTP and HTTPS proxy in Settings -> Resources -> Proxies. But I always get an error.

docker run from my Windows terminal results in this message

PS C:\Users\pd03056> docker run -it --rm hello-world:latest
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": remote error: tls: handshake failure.
See 'docker run --help'.

The CNTLM log does not state anything either. So Docker Desktop does not use my CNTLM! host.docker.internal resolves to a correct IP of my workstation. Putting 127.0.0.1 or localhost instead of host.docker.internal does not change anything.

Anyone got an idea why my Docker Desktop installation does not pick up the Proxy config?

3
  • I suggest you check with Wireshark what Docker Desktop is doing on the network. Note that it may be local traffic that is only visible on the virtual loopback capture adapter. // Docker also has debug logging that you can enable.
    – Daniel B
    Oct 11, 2022 at 9:41
  • Does it work if you set the HTTP_PROXY and HTTPS_PROXY environment variables instead?
    – squillman
    Oct 11, 2022 at 13:23
  • Still same error message with the environment variables. Oct 12, 2022 at 11:11

0

You must log in to answer this question.

Browse other questions tagged .