dockerfiles-windows
dockerfiles-windows copied to clipboard
Cannot connect to chocolatey.org or any other internet site from within container
I am having a similar issue to: https://devops.stackexchange.com/questions/2155/cannot-connect-to-chocolatey-org-or-any-other-internet-site-from-within-containe/2173#2173
This is the error message:
Step 4/4 : RUN powershell -Command iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); choco feature disable --name showDownloadProgress
---> Running in ba5fb7c767e0
Exception calling "DownloadString" with "1" argument(s): "The remote name
could not be resolved: 'chocolatey.org'"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://chocolatey.or ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
choco : The term 'choco' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:88
Yes I am corporate environment.
The answer seems to suggest a "--dns 8.8.8.8" solution.... but where and how do you make this change?
I have tried a number of proxy settings of the form: ENV ftp_proxy="http://xxx:80" ENV https_proxy="http://xxx:80" ENV http_proxy="http://xxx:80" ENV no_proxy=".xxx.com"
ENV chocolateyProxyLocation="http://xxx:80"
But these don't seem to change anything.
Advice?
Thanks Carl
Hi @ShamanTcler,
Have you solved this problem? I have the same issue and have no idea how to fix it
This kind of networking problem is often solved by using the latest Windows updates on the host and maybe current Windows base images.