Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to chocolatey.org or any other internet site from within container #430

Open
ShamanTcler opened this issue Oct 9, 2019 · 2 comments

Comments

@ShamanTcler
Copy link

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

@farmovit
Copy link

farmovit commented Jun 24, 2020

Hi @ShamanTcler,

Have you solved this problem? I have the same issue and have no idea how to fix it

@StefanScherer
Copy link
Owner

This kind of networking problem is often solved by using the latest Windows updates on the host and maybe current Windows base images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants