如何在 AppVeyor 中为 docker 激活 linux-容器?

How to activate linux-containers for docker in AppVeyor?

我想为 CI 使用 AppVeyor,我想为 docker 使用 Linux 容器。我使用 Visual Studio 2017 图片。当我 运行 docker-switch-linux 我得到以下错误:

Unable to start: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'MobyLinuxVM' failed to start.
Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running.
'MobyLinuxVM' failed to start. (Virtual machine ID C5FFC9C0-7293-45A6-B7C6-3FFC31AE0D25)
The Virtual Machine Management Service failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running (Virtual machine ID C5FFC9C0-7293-45A6-B7C6-3FFC31AE0D25).
at Start-MobyLinuxVM, <No file>: line 300
at <ScriptBlock>, <No file>: line 395

有什么线索吗?

我也添加了- ps: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All但是没有用。

我们在 Visual Studio 2017 图像上停止了 运行 Docker CE,因为我们遇到了最新的 Docker CE 和最新的 Windows Server 2016 更新。

作为解决方法,我们为 Docker CE 提供名为 Windows Server 2019 的图像。示例用法为 here. Note that we provide this image by request and need your AppVeyor account name for this. Please request access to this image by email to support@appveyor.com or by post to https://help.appveyor.com/.

我们还计划将容器功能 (Docker EE) 添加到正式可用的映像 Visual Studio 2019。请观看 this GitHub 问题。