在 Windows 10 Enterprise 上设置 Docker

Setup Docker on Windows 10 Enterprise

我有 windows10 Enterprise,64 位,内部版本:版本 10.0.17763 内部版本 17763。安装了 Oracle VM VirtualBox。

已为 Windows 下载最新的 Docker:https://hub.docker.com/?overlay=onboarding 并出现此错误:

Take 2:删除了最新版本并安装了版本 2.0.0.1:https://chocolatey.org/packages/docker-desktop/2.0.0.2

现在它正在打开,但我得到以下信息:

Unable to check availability for Windows feature Hyper-V: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Dism' was not loaded because no valid module file was found in any module directory. at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36 at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92 at Docker.Actions.<>c__DisplayClass19_0.b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74 at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

当我 运行 从 CMD 中执行以下命令时,我得到:

拍摄 3: 为 Windows 更新到最新版本的 Docker 我明白了:

Unable to stop - The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory.

如何为 windows 设置 Docker?

即使在受支持的 Windows 版本上,您仍然需要使用 DISM 启用 Hyper-v。此处有 Microsoft 的说明:https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v#enable-hyper-v-with-cmd-and-dism

这为我修复了它:

https://github.com/docker/for-win/issues/65#issuecomment-243458778

  • 启用 Hyper-V(在 PowerShell 中):DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
  • 重新启动 Windows 服务 => Docker 桌面服务(根据上面的 link)