-
Notifications
You must be signed in to change notification settings - Fork 56
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
Error installing docker on Windows Server 2016 behind proxy #14
Comments
Can you please run the command with -Verbose and provide the output? install-package -name docker -providername DockerMsftProvider -Verbose Thanks, |
Hi Jay, here's the output with verbose option:-
|
Can you please provide output of: |
PS C:\Windows\system32> find-package -name docker -providername DockerMsftProvider -Verbose
|
@sidviscious, |
I'm also having this problem - see also: MicrosoftDocs/Virtualization-Documentation#434 In my case, I'm behind a proxy. Changing the below command:
to
worked for me, but I can't see any way to pass proxy credentials for the later Ref: https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/ |
@jayshah-msft I was behind a proxy. Tried it from a different network and it worked Thank you. |
@sidviscious - could you reopen this please? I can't just try another network so I need this to work from behind a corporate proxy. Until it does, I'm stuck AFAICS... |
@dhirschfeld reopened it. |
Thx! |
In case it helps anyone else you can manually download and install following the instructions at: https://msdn.microsoft.com/en-au/virtualization/windowscontainers/docker/configure_docker_daemon |
@dhirschfeld, Thanks for your feedback. Cheers, |
@jayshah-msft - any update on this - has the timeline slipped? |
Use -Proxy flag with your proxy. It works fine Install-Module DockerProvider -Force -Proxy {http://yourproxyserver:port} |
Install-Package Docker does not work when the proxy requires authentication credentials (@kethahel99 says it works with a non-authenticated proxy though). |
I know this looks like a zombie thread right now, but for anyone on Windows 10 who googled and ended up here because of something that looks like this: PS C:\Windows\system32> Install-Package -Name docker -ProviderName DockerMsftProvider Install-Package : Unable to find package providers (DockerMsftProvider).
At line:1 char:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage Make sure you check your execution policy as well. Eventually after trying enough things, I listed available package providers and came across this error: PS C:\Windows\system32> Get-PackageProvider -ListAvailable
WARNING: File C:\Program Files\WindowsPowerShell\Modules\DockerMsftProvider\1.0.0.8\DockerMsftProvider.psm1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
WARNING: File C:\Program Files\WindowsPowerShell\Modules\DockerProvider\0.0.0.3\DockerProvider.psm1 cannot be loaded because running scripts is disabled on
this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
NuGet 2.8.5.208 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, C...
PowerShellGet 1.0.0.1 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, Filter, T...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent And from there, I was able to read about the default execution policy, which is PS C:\Windows\system32> Get-ExecutionPolicy
Restricted
PS C:\Windows\system32> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned And then it installed with zero problems. PS C:\Windows\system32> Install-Package -Name docker -ProviderName DockerMsftProvider -Verbose
VERBOSE: Importing package provider 'DockerMsftProvider'.
VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
VERBOSE: Download size: 0.02MB
VERBOSE: Free space on the drive: 425448.88MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\robbm\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 0 seconds.
VERBOSE: Performing the operation "Install Package" on target "Package 'Docker' version '19.03.3' from 'DockerDefault'.". |
In case anybody else comes across this, I ran into the same error with Windows Server 2016 installed in a Hyper-V session (which I guess counts as a proxy). The fix was to install Powershell Core v7 and it worked just fine. |
I tried with Powershell 5.1 and Powershell Core v7 on new Windows Server 2016 (Ver 1607 Build: 14393.3443) but still getting the same error. |
Had similar issues, solution was [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force |
https://stackoverflow.com/a/64654070/14413665 worked for me |
You might want to take a look at Stevedore project as a way to install modern Docker for Windows containers on both Windows Server/Client. |
I had to set a system proxy in the new Windows server settings panel to get this to work with a proxy. The Looking at the source code for MicrosoftDockerProvider/DockerMsftProvider.psm1 Line 1167 in 68a31d2
The function utilizes |
For anybody that runs into this in the future, the MicrosoftDockerProvider is now deprecated and doesn't work. https://github.com/OneGet/MicrosoftDockerProvider |
Trying to install docker on windows server 2016 in a VM. Fails with the below error.
PS C:\Windows\system32> install-package -name docker -providername DockerMsftProvider -Force
WARNING: Cannot find path 'C:\Users\TESUSR~1\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because it does not exist.
WARNING: Cannot bind argument to parameter 'downloadURL' because it is an empty string.
WARNING: The property 'AbsoluteUri' cannot be found on this object. Verify that the property exists.
WARNING: The property 'RequestMessage' cannot be found on this object. Verify that the property exists.
install-package : No match was found for the specified search criteria and package name 'docker'. Try Get-PackageSource to see all available registered package sources.
At line:1 char:1
The text was updated successfully, but these errors were encountered: