繁体   English   中英

在 Windows Server 2016 TP4 上安装 Docker

[英]Installing Docker on Windows Server 2016 TP4

我想在安装了 Windows Server 2016 的物理机上安装 Docker。 (使用管理员帐户,而不是访客或普通用户帐户)

所以我尝试了这个指南

但是第二个命令失败并出现以下错误:

命令:powershell.exe -NoProfile -ExecutionPolicy Bypass C:\\Install-ContainerHost.ps1 -HyperV

...
Docker is already installed.
Installing ContainerImage provider...
C:\Install-ContainerHost.ps1 : Could not install ContainerImage provider
In Line:1 ...
+ C:\Install-ContainerHost.ps1 -HyperV
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
   + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException, Install-ContainerHost.ps1

我找不到解决方案..有什么想法吗?

编辑/更新:我重新安装了 Windows Server 2016。第一次运行脚本后,我收到此错误:

...
Downloading NSSM...
Extracting NSSM for archive...
Configuring NSSM for Docker service...
Starting Docker...
Waiting for Docker daemon...
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: Das System kann die angegebene Datei nicht finden.
...
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: Das System kann die angegebene Datei nicht finden.
C:\Users\Administrator\Install-ContainerHost.ps1 : Docker Daemon did not start successfully within 1 minute.
In Zeile:1 Zeichen:1
+ C:\Users\Administrator\Install-ContainerHost.ps1 -HyperV
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ContainerHost.ps1

在脚本的以下执行中,我在第一篇文章中收到错误消息。

我有同样的问题,以下是如何修复它的方法。

如果您在系统上运行Get-PSRepository ,我会看到消息“警告:无法找到模块存储库”。 在我的Windows 10盒子上运行表明我确实有一个存储库设置。

我运行以下命令来设置相同的存储库

powershell Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted

一切都很有效。

我正在使用Windows Server 2016 TP5,但我认为这将解决您的问题。

对于在 2021 年寻找答案的人,我以管理员身份在 powershell 上使用以下命令在 Windows Server 2016 上安装了 docker

  1. Install-Module -Name DockerMsftProvider -Repository PSGallery –Force
  2. 安装包 -Name docker -ProviderName DockerMsftProvider -verbose
  3. 获取服务码头工人
  4. 启动服务泊坞窗

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM