2016-04-29 222 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' –

相關問題