0

I'm trying to install Docker on my Windows server 2016 using PowerShell, but I'm encountering an issue. Here's the command I'm using:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
 
set-executionpolicy unrestricted
 
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

Install-Module -Name DockerMsftProvider -Force

Install-Package -Name docker -ProviderName DockerMsftProvider -Force

Here is the Error

WARNING: Cannot find path 'C:\Users\AZUREL~1\AppData\Local\Temp\2\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:9 char:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

1
  • Better use Set-ExecutionPolicy Bypass Process to allow everything in the current window/process Commented Sep 7, 2023 at 8:04

1 Answer 1

1
  1. The DockerMsftProvider is down github.

  2. You can use install-docker-ce.ps1 from microsoft tutorial, and run it will PowerShell 64bit

    .\install-docker-ce.ps1

    But the script will install the latest version(V24), it won't work on Windows Server 2016.

  3. So you must manually install from binary, the latest work version is 20.10.9

    C:> Expand-Archive /path/to/.zip -DestinationPath $Env:ProgramFiles

    C:> &$Env:ProgramFiles\Docker\dockerd --register-service

Details of install from binary

PS. Most docker image won't run under Windows Server 2016, it's better to move to Windows Server 2019

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.