2016-04-29 225 views
1

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

所以我试过这个guideline

但第二个命令失败,以下错误:

命令:powershell.exe -NoProfile -ExecutionPolicy绕道C:\安装-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 

我找不到解决方案..任何想法?

编辑/ UPDATE: 我重新安装的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 

在脚本的执行之后我得到的错误在我的第一篇文章。

+0

你是否从管理提示符执行此操作?听起来像它不能写一些数据。 – Martin

+0

是的,我愿意。我正在使用管理员帐户并以管理员身份启动shell。 – nast

回答

2

我有同样的确切问题,以下是如何和固定它。

如果您在系统上运行Get-PSRepository,我看到消息“WARNING:Unable to find module repositories”。在我的Windows 10盒子上运行表明我确实有一个存储库设置。

我跑到下面的设置相同的存储库

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

一切工作一种享受。

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

+1

命令“Get-PSRepository”返回带有一个Entry:PSGallery的列表。但是InstallationPolicy不受信任。我怎样才能改变这一点? – nast

+1

@nast试试'powershell Set-PSRepository -Name“PSGallery”-InstallationPolicy Trusted' –

相关问题