Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker installation fails on Windows Server 2019

I'm trying to install Docker on Windows Server 2019 (not Docker Desktop--it doesn't work on Windows Server; we've already tried). I am following this guide: https://blog.sixeyed.com/getting-started-with-docker-on-windows-server-2019/. I run the following in an escalated PowerShell window (and logged in with local Administrator account)

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

That part succeeds, so I go to the next step:

Install-Package -Name docker -ProviderName DockerMsftProvider -verbose

I get the following error:

> VERBOSE: Using the provider 'DockerMsftProvider' for searching
> packages. WARNING: Cannot find path
> 'C:\Users\ADMINI~1\AppData\Local\Temp\4\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],
> Ex    ception
>     + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

I've read several forums about this error and so I've also tried:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force

... but I get the following error:

WARNING: Cannot find path
'C:\Users\ADMINI~1\AppData\Local\Temp\4\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 Docker -ProviderName DockerMsftProvider -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exc
   eption
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Most of the forums I've read on this issue are related to a Proxy issue, however the VM is not behind a proxy--just a Cisco firewall--and Windows Defender Firewall is completely disabled.

I verified that the Container feature has been installed, as well as Hyper-V. And since the machine is a VM and so I also enabled "Expose hardware assisted virtualization to the guest OS" and "Enable virtualized CPU performance counters" in VMware.

like image 787
m0chi Avatar asked Oct 26 '25 12:10

m0chi


2 Answers

The issue was apparently with the ciphers in Windows Registry. After running Get-PackageSource, IsTrusted for DockerDefault was False. So we ran IIS Crypto CLI (in CMD: .\iiscryptocli.exe /template default /reboot) to reset the Windows encryption registry keys to default and after rebooting, the Docker install succeeded. So I guess that the PowerShell Install-package cmdlet was unable to get the JSON file needed to help install Docker from https://go.microsoft.com/fwlink/?LinkID=825636&clcid=0x409 because of an encryption negotiation problem.

like image 192
m0chi Avatar answered Oct 29 '25 02:10

m0chi


I found it easier to use: choco install docker

Reference: Error trying to install Docker in Windows Server 2016 with Install-Module

like image 29
Ron Smith Avatar answered Oct 29 '25 01:10

Ron Smith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!