[英]Installing Docker on Windows Server 2016 TP4
I want to install Docker on a physical machine with Windows Server 2016 installed.我想在安装了 Windows Server 2016 的物理机上安装 Docker。 (Using the Admin-Account, not a Guest or Normal User Account)
(使用管理员帐户,而不是访客或普通用户帐户)
So i tried this guideline .所以我尝试了这个指南。
But the second command fails with following error:但是第二个命令失败并出现以下错误:
Command: powershell.exe -NoProfile -ExecutionPolicy Bypass C:\\Install-ContainerHost.ps1 -HyperV命令: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
I can't find a solution.. any Ideas?我找不到解决方案..有什么想法吗?
EDIT/UPDATE: I reinstalled the Windows Server 2016. After the first run of the script i get this error:编辑/更新:我重新安装了 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
In the following executions of the script i get the error in my first post.在脚本的以下执行中,我在第一篇文章中收到错误消息。
I had the same exact problem and the following is how and what fixed it. 我有同样的问题,以下是如何修复它的方法。
If you run Get-PSRepository
on your system I was seetign the message "WARNING: Unable to find module repositories". 如果您在系统上运行
Get-PSRepository
,我会看到消息“警告:无法找到模块存储库”。 Running on my Windows 10 box showed that i did have a repository setup. 在我的Windows 10盒子上运行表明我确实有一个存储库设置。
I ran the following to set the same repository 我运行以下命令来设置相同的存储库
powershell Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted
Everything worked a treat. 一切都很有效。
I am using the Windows Server 2016 TP5 but i think it this will solve your issue. 我正在使用Windows Server 2016 TP5,但我认为这将解决您的问题。
For whoever is looking an answer in 2021 I installed docker on Windows Server 2016 using the following commands on powershell as admin对于在 2021 年寻找答案的人,我以管理员身份在 powershell 上使用以下命令在 Windows Server 2016 上安装了 docker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.