OneGet / MicrosoftDockerProvider

Provider to search, save and install Docker
Other
133 stars 55 forks source link

Provider doesn't work over PS remoting, OneGet works #31

Open mtman opened 7 years ago

mtman commented 7 years ago

Running Find-Package -Name docker -ProviderName DockerMsftProvider works in a local powershell session. Running Find-Package PSWindowsUpdate -ProviderName PowershellGet works in a remote PS session. When I run the first command in the remote session, it produces:

VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
VERBOSE: Download size: 0.01MB
VERBOSE: Free space on the drive: 92728.79MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
WARNING: Cannot find path 'C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because  it does not exist.
WARNING: Save-HTTPItem: Bits Transfer failed. Job State:  ExitCode = -2147023651
Find-Package : No match was found for the specified search criteria and package name 'docker'. Try Get-PackageSource to see all
available registered package sources.
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage

I can get the file using invoke-webrequest https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json

Windows Server 2016, $PSVersionTable:

Name                           Value
----                           -----
PSVersion                      5.1.14393.1480
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1480
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
jeremiahsnapp commented 6 years ago

This has been fixed. You just need to update the DockerMsftProvider module first.

Update-Module -Name DockerMsftProvider -Force

reference: https://github.com/OneGet/MicrosoftDockerProvider/issues/18#issuecomment-367190686