Open ardalon opened 5 years ago
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/remove-lifecycle stale
Have you found a different solution than the one with the .reg file posted in your link?
Unfortunately no. We are using proxy switches and environment variables as reqd per command and using powershell script to automate this a bit. We are using 2019 containers now so we can't use the registry hack -- which I don't recommend even on 2016 containers.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/lifecycle frozen
/remove-lifecycle stale
Expected behavior
Internet access available without needing to explicitly set
-Proxy
type switches on each and every CLI command. OR using a command such asnetsh winhttp set proxy
Proxy configuration should be a machine/container level setting much as it is on the OS itself.
Actual behavior
No internet access available without using a -Proxy flag (on commands that support it)
Information / Workaround
Rather than an environment variable that I reference in each CLI command (and one that I will have to manually remove from each place in my code should I no longer need to use a proxy resulting in brittle code) there should be a mechanism, such as via netsh that will allow
This clever but hacky solution works on:
Windows Server 2016 [Version 1607 (OS Build 14393.2724) using the image: microsoft/dotnet-framework:4.7.2-sdk-20180615-windowsservercore-ltsc2016
Docker versions:
Client: Version: 17.06.2-ee-11
Server: Engine: Version: 17.06.2-ee-11 Experimental: false
however it does NOT work on:
Windows Server 2019 [Version 1809 (OS Build 17763.253) using the image: microsoft/dotnet-framework:4.7.2-sdk-20190108-windowsservercore-ltsc2019
Docker versions:
Client: Version: 18.03.1-ee-6
Server: Engine: Version: 18.03.1-ee-6 Experimental: false
Steps to reproduce the behavior
Export Registry key: [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings] to a file proxy.reg
docker run -e "HTTP_PROXY=http://ProxyIP:ProxyPort" --rm -i -t -v C:\PathToHostFiles:C:\solution microsoft/dotnet-framework:4.7.2-sdk-20190108-windowsservercore-ltsc2019 "cd \solution ; regedit.exe -S proxy.reg ; Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord ; wget -outfile asdf.txt -usebasicparsing http://google.com ; cat asdf.txt "