windows - 在 Windows Server 2016 TP4 上安装 Docker

标签 windows docker server

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

所以我尝试了这个 guideline .

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

命令: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,但我认为这会解决您的问题。

关于windows - 在 Windows Server 2016 TP4 上安装 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36933799/

相关文章:

php - 如何从 PHP 服务器获取字符串到 Android?

c++ - 在 Windows 中实现 "do not disturb/distract me"模式

postgresql - 从仅数据PostgreSQL Docker卷迁移数据

c++ - 随着时间的推移,基于 Windows 的 C++ 应用程序会消耗更多的 CPU

docker - 在GoCD-Agent中实现FooD(Docker之外的Docker)

ubuntu - 我可以在 docker Container Ubuntu 14.04 中运行 docker

c - 套接字 : showing ip and hostname of the client

bash - 如何停止当前在云形成中运行的所有堆栈操作?

c# - 以编程方式选择用于 DirectX 渲染的最佳显卡

windows - 如何在与windows批处理文件相同的目录中执行程序?