OneGet / MicrosoftDockerProvider

Provider to search, save and install Docker
Other
135 stars 56 forks source link

Failed to install Docker on Windows 2016 - No Proxy Used - Running Elevated #77

Closed mrUlrik closed 3 years ago

mrUlrik commented 3 years ago

This is being run from an elevated PowerShell. Proxies are not used on the network.

The Install-Module does not appear to produce any failing errors. The disconnect is when running Install-Package. It seems to be looking in C:\Users\User\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json which indeed that entire directory is empty.

Is there a method to force Install-Package to look into a specific directory? Is the package "docker" somehow misconfigured?

I see the line VERBOSE: The installation scope is specified to be 'AllUsers'. which leads me to believe that Install-Module shouldn't be using %LocalAppData%?

PS C:\Users\User> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force -Verbose

VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2'; IsTrusted = 'True'; IsRegistered = 'True'. VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: Using the specified source names : 'PSGallery'. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='DockerMsftProvider'' for ''. VERBOSE: Total package yield:'1' for the specified package 'DockerMsftProvider'. VERBOSE: Performing the operation "Install-Module" on target "Version '1.0.0.8' of module 'DockerMsftProvider'". VERBOSE: The installation scope is specified to be 'AllUsers'. VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'. VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'. VERBOSE: Downloading module 'DockerMsftProvider' with version '1.0.0.8' from the repository 'https://www.powershellgallery.com/api/v2'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='DockerMsftProvider'' for ''. VERBOSE: InstallPackage' - name='DockerMsftProvider', version='1.0.0.8',destination='C:\Users\User\AppData\Local\Temp\1333801760' VERBOSE: DownloadPackage' - name='DockerMsftProvider', version='1.0.0.8',destination='C:\Users\User\AppData\Local\Temp\1333801760\DockerMsftProvider.1.0.0.8\DockerMsftProvider.1.0.0.8.nupkg',uri='https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.8' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.8'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.8'. VERBOSE: Completed downloading 'DockerMsftProvider'. VERBOSE: Hash for package 'DockerMsftProvider' does not match hash provided from the server. VERBOSE: InstallPackageLocal' - name='DockerMsftProvider', version='1.0.0.8',destination='C:\Users\User\AppData\Local\Temp\1333801760' VERBOSE: Validating the 'DockerMsftProvider' module contents under 'C:\Users\User\AppData\Local\Temp\1333801760\DockerMsftProvider.1.0.0.8' path. VERBOSE: Test-ModuleManifest successfully validated the module manifest file 'C:\Users\User\AppData\Local\Temp\1333801760\DockerMsftProvider.1.0.0.8'. VERBOSE: Validating the authenticode signature and publisher of the catalog file or module manifest file of the module 'DockerMsftProvider'. VERBOSE: Catalog file 'DockerMsftProvider.cat' is not found in the contents of the module 'DockerMsftProvider' being installed. VERBOSE: Valid authenticode signature found in the file 'DockerMsftProvider.psd1' for the module 'DockerMsftProvider'. VERBOSE: For publisher validation, current module 'DockerMsftProvider' with version '1.0.0.8' with publisher name 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US' from root certificate authority 'CN=Microsoft Root Certificate Authority2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'. Is this module signed by Microsoft: 'True'. VERBOSE: For publisher validation, using the previously-installed module 'DockerMsftProvider' with version '1.0.0.8' under 'C:\Program Files\WindowsPowerShell\Modules\DockerMsftProvider\1.0.0.8' with publisher name 'CN=Microsoft Corporation, O=Microsoft Corporation,L=Redmond, S=Washington, C=US' from root certificate authority 'CN=Microsoft Root Certificate Authority 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'. Is this module signed by Microsoft: 'True'. VERBOSE: Authenticode issuer 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US' of the new module 'DockerMsftProvider' with version '1.0.0.8' matches with the authenticode issuer 'CN=Microsoft Corporation, O=Microsoft Corporation,L=Redmond, S=Washington, C=US' of the previously-installed module 'DockerMsftProvider' with version '1.0.0.8'. VERBOSE: Checking for possible command collisions for the module 'DockerMsftProvider' commands. VERBOSE: Module 'DockerMsftProvider' was installed successfully to path 'C:\Program Files\WindowsPowerShell\Modules\DockerMsftProvider\1.0.0.8'.

PS C:\Users\User> Install-Package -Name docker -ProviderName DockerMsftProvider -Verbose

VERBOSE: Using the provider 'DockerMsftProvider' for searching packages. WARNING: Cannot find path 'C:\Users\User\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

+ Install-Package -Name docker -ProviderName DockerMsftProvider -Verbos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

PS C:\Users\User> Get-PackageSource -Name DockerDefault | select *

Name : DockerDefault Location : https://go.microsoft.com/fwlink/?LinkID=825636&clcid=0x409 Source : DockerDefault ProviderName : DockerMsftProvider Provider : Microsoft.PackageManagement.Implementation.PackageProvider IsTrusted : False IsRegistered : True IsValidated : False Details : {}

mrUlrik commented 3 years ago

Furthermore, I've just launched an evaluation version of 2016 in a virtual machine outside of the corporate network just to be sure there is not a proxy server somewhere in the line. The fresh install of 2016 produces precisely the same result above.

Steps taken after the install completed:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
Install-Module PowerShellGet -Force
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
PS C:\Windows\system32> Get-Module PowerShellGet

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     2.2.5      PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
mrUlrik commented 3 years ago

Scratch that. The problem was ultimately applying: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Between installing PowerShellGet I restarted the console losing that setting being set.