Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Unable to connect from within corporate networks #8

Open
nilleb opened this issue Apr 28, 2016 · 11 comments
Open

Unable to connect from within corporate networks #8

nilleb opened this issue Apr 28, 2016 · 11 comments

Comments

@nilleb
Copy link

nilleb commented Apr 28, 2016

I work from behind a corporate proxy. Which eventually asks for the user authentication.

How should I use this powershell module in order to download container images through the corporate proxy?

Hint: the httpClient(s) should be initialized via an HttpClientHandler

image

@quoctruong
Copy link

Hi @nilleb, for your question on msdn forum (https://social.msdn.microsoft.com/Forums/en-US/30e7e8fe-ba48-4f1c-8d75-36b54af502ae/installpackageprovider-no-match-was-found?forum=windowscontainers), can you help us identify the problems by trying out the following commands?

  1. Run “Get-PackageProvider nuget” to see whether he has NuGetProvider
  2. Run “Find-PackageProvider ContainerImage -Verbose”
  3. Run “Find-Module ContainerImage -Verbose”

Thanks,

Quoc

@nilleb
Copy link
Author

nilleb commented Apr 30, 2016

I'll give you the desired information on Monday.

But, let's not mix the two problems, please. (I say this because the problems affect two different tools, and because you're asking more details about a problem in the msdn forums, via a possibly unrelated issue in github)

@nilleb
Copy link
Author

nilleb commented May 2, 2016

Ciao Quoc,

I have added the details you asked on the MSDN question (https://social.msdn.microsoft.com/Forums/en-US/30e7e8fe-ba48-4f1c-8d75-36b54af502ae/installpackageprovider-no-match-was-found?forum=windowscontainers).

By the way, which is the officially recommended procedure to set the proxy on a Windows Server Core without Desktop Experience? And for Windows Server Nano?

Thanks for your attention,
Ivo

@nilleb
Copy link
Author

nilleb commented May 2, 2016

I have found a workaround for the question on the MSDN forums. Have a look at the MSDN forums to see how to workaround this issue.

But, this issue persists, BECAUSE these scripts won't work if the system proxy asks for the user authentication. Sadly, this is the case of almost all the tools provided by Microsoft in the last year..

@quoctruong
Copy link

Hi @nilleb, for the authentication proxy issue for "install-packageprovider": we have a planned work item for adding support for proxy with authentication in OneGet and PowerShellGet so hopefully that would solve this problem.

As for the authentication proxy issue for "install-containerimage": we are not using the httpclient to download so the fix suggested won't solve it (unless you are using the older version of ContainerImage which uses HttpClient on NanoServer). However, we will look into adding support for authentication proxy in future release of container images.

@nilleb
Copy link
Author

nilleb commented May 2, 2016

Hi @quoctruong ,

I'm happy to hear that you will soon support authenticated proxies in "install-packageprovider" and in "install-containerimage".

You are surely right when you say that the psm1 doesn't use httpClient to _download _the file. Yet, it uses an $httpClient to get the file length and to resolve the FwkLink (it means, as I read the code, that it uses an httpclient to get the URI to download the images from. specifically, these download links are the ones I've mentioned in my MSDN question).

Have a good evening,
nilleb

@nilleb
Copy link
Author

nilleb commented May 2, 2016

By the way, @quoctruong , may I ask you what do you think about a solution like https://github.com/nilleb/authentication-proxy ? That's just a little workaround, but it has helped me in our environment.

@jayshah-msft
Copy link
Contributor

@nilleb
Apologies that you are facing these issues. We have a work item on our end to get this resolved soon.
However, in the meanwhile, you can unblock yourself by using the Start-BitsTransfer with its Proxy parameters to get around this.
To download the WindowsServer Container image, please use this URI:
https://az887518.vo.msecnd.net/pshctcontainer/WindowsServerCore-10-0-14300-1000.wim
Feel free to ping us if you face any other issues.

HTH!
Thanks for your patience.

Cheers,
Jay!

@luisgf
Copy link

luisgf commented May 31, 2016

Any news about this? I have the same problem with our corporate proxy :-/

@quoctruong
Copy link

Hi @luisgf, we are fixing the issue for the next release of ContainerImage provider. Please stay tune!

@rbj325
Copy link

rbj325 commented Jun 9, 2016

Hey guys,

I was able to work around this issue by manually downloading the .Wim file to the C: drive:
https://az887518.vo.msecnd.net/pshctcontainer/WindowsServerCore-10-0-14300-1000.wim

Then instead of calling Install-ContainerImage, use:

Install-ContainerOSImage -WimPath c:\WindowsServerCore-10-0-14300-1000.wim

That process will take awhile but then just Restart-Service docker and the image should show up running docker images command.

If you call Install-ContainerImage with -Verbose command and go into the .psm1 file it will lead you to the above call.

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

No branches or pull requests

5 participants