简体   繁体   中英

Docker Engine Hyper-V Proxy - Windows 10 Not working

When working behind a corporate proxy (automatically activated in Windows) by Cisco AnyConnect(v4.7.03052) VPN, I'm unable to pull any docker image either from our docker nexus registry or the official registry.
Funny enough, if I set the proxy settings in the config.json and pass the proxy as build-arg my containers are able to build(from previously pulled images) and talk to the exterior.
Only the docker engine is unable to access the inte.net through the proxy.

I've already tried the following:

  • Set the HTTP_PROXY/HTTPS_PROXY as environments variables
  • Set the proxy settings in the Docker Desktop proxy section - Docker doc
  • Set the resources.network IP to the non-secured Cisco AnyConnect routes IPv4
  • No firewall rules seems to block the outbound request from the docker engine service.
  • Edit the deamon.json used by the docker service to register the mirror registries.

Stackoverflow answers not working in this case: docker-win10 ; docker on windows ; docker image proxy

Platform info:

  • Win 10 - Build 19401
  • Docker Desktop 4.4.4(73704)
  • Docker Engine 20.12.12 (Linux container on Hyper-V)
  • Cisco AnyConnect v4.7.03052

Error message on docker pull :

λ  docker pull traefik:2.0
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Based on the similar stackoverflow issue briefly executing the command below had it working for a short time:

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

This was a regression that slipped in the 4.4.4 see github issue .
It seems to have been resolved in the v4.5.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM