Estoy ejecutando Docker en Windows Server 2019 y dentro de Docker ejecuto servercore:ltsc2019. Pero no puedo configurar el servidor proxy correctamente.
El host y el demonio docker están configurados para usar un servidor proxy. Puedo extraer la imagen y ejecutarla, sin embargo, el contenedor en ejecución parece no usar el servidor proxy.
Puedo hacer ping a hosts internos y externos. También puedo descargar desde servidores internos: (New-Object System.Net.WebClient).DownloadString('http://a.server.lokal') . Pero si pruebo direcciones externas, obtengo una excepción:
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"Ya he intentado configurar el servidor proxy usando:
netsh winhttp set proxy "http://<ip>:<port>"y también:
$rkey="HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" Set-ItemProperty -path $rkey ProxyEnable -value 1 Set-ItemProperty -path $rkey ProxyServer -value "http://<ip>:<port>"Pero eso tampoco ayudó.
Entonces, ¿cómo puedo configurar el servidor proxy?