Connect Docker For Mac Container To Internet10/22/2021
It turns out that Windows actually reads the values for the proxy from the key in the registry. Then in your Dockerfile add the following lines. How do I specify the proxy server a Windows container should use?I exported the registry from one of my servers that had the proxy settings to a reg-file.Export the key to a file called proxy.reg. Did not work.I think i tried every combination of the above.Just to verify that nothing is wrong with our proxy server I tried to specify the proxy in the Invoke-Webrequest like this:Invoke-WebRequest -Uri $url -Proxy $proxy -OutFile install.ps1 and it works! I can see in Wireshark that the proxy server is called with the http request.So my question is. The Invoke-Webrequest cmdlet do not use the proxy server when making a call to the internet.I can see in Wireshark that the container tries to call the IP for the url not the IP for the proxy server.I also tried to set the environmentvariabels HTTP_PROXY and HTTPS_PROXY on both my docker host and in the Windows container.
![]() ![]() ![]()
0 Comments
Leave a Reply.AuthorAshley ArchivesCategories |