Windows Server Container On Windows Server 2016(VMs)

1 . Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

  1. Install-Module -Name DockerMsftProvider -Force

  2. Install-Package -Name docker -ProviderName DockerMsftProvider -Force
    You may got this exception when execute this command

    Install-Package : Unable to find package providers (DockerMsftProvider).
    At line:1 char:1

  • Install-Package -Name docker -ProviderName DockerMsftProvider -Force
  •   + CategoryInfo          : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
     xception
      + FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
    
    

To Solve this, use following command:
Import-Module -Name DockerMsftProvider -Force
Import-Packageprovider -Name DockerMsftProvider

Then run this again
Install-Package -Name docker -ProviderName DockerMsftProvider

  1. Docker Dev powershell tools
    Register-PSRepository -Name DockerPS-Dev -SourceLocation https://ci.appveyor.com/nuget/docker-powershell-dev
    Install-Module Docker -Repository DockerPS-Dev -Scope CurrentUser
    Update-Module Docker

你可能感兴趣的:(Windows Server Container On Windows Server 2016(VMs))