如何在 Amazon AWS EC2 Windows 上使用 Windows 容器运行 Docker Desktop(或者这不可能)?

我有一台运行 Windows 10 的 DESKTOP 机器,运行 Windows 10、Microsoft 365、在 Windows 容器模式下运行的 Docker Desktop。

我有一台运行 Windows Server 2019 的 Amazon EC2 机器,并且在那里也安装了 Microsoft 365 并通过 RDP 访问。

本质上,我想要创建一台 EC2 机器,它允许我运行 Microsoft 365 和在 Windows 容器模式下运行的 Docker 桌面。

我已经尝试创建 AWS EC2 实例并安装 Docker for Desktop,但我得到了很多神秘的错误。 (见下文)。

我尝试使用 Microsoft 的这个 AMI 和内置的 Hyper-V https://aws.amazon.com/marketplace/server/procurement?productId=d94e0325-6111-4c69-8c29-87e784a6d0aa

[或者我应该为此使用 Docker Enterprise 吗?]

[或者根本不可能获得一台在 AWS 上运行 Docker Windows 容器的 Windows 机器?]

[或者我是否需要选择特定类型的机器大小 [t4.large 或其他] - 我在 Microsoft Azure 上体验过,只有在特定规格的机器上才能运行 Docker Desktop,这允许“虚拟化之上的虚拟化” "]

System.InvalidOperationException:
job failed with message: 'DockerDesktopVM' failed to start. (Virtual machine ID 677B7F36-8A44-42CE-AD29-7884DDCE164C)

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID 677B7F36-8A44-42CE-AD29-7884DDCE164C).
   at Docker.Backend.HyperVInfrastructure.HandleUpdatedJob(CIMConcreteJob updatedJob) in C:workspacesPR-15633srcgithub.comdockerpinatawinsrcDocker.BackendHyperVHyperVInfrastructure.cs:line 762
   at Docker.Backend.HyperVInfrastructure.<HandleMaybeAsyncJob>d__38.MoveNext() in C:workspacesPR-15633srcgithub.comdockerpinatawinsrcDocker.BackendHyperVHyperVInfrastructure.cs:line 696
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Backend.HyperVInfrastructure.<StartVMAsync>d__30.MoveNext() in C:workspacesPR-15633srcgithub.comdockerpinatawinsrcDocker.BackendHyperVHyperVInfrastructure.cs:line 544
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Backend.HyperV.<StartAsync>d__6.MoveNext() in C:workspacesPR-15633srcgithub.comdockerpinatawinsrcDocker.BackendHyperVHyperV.cs:line 99
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Backend.HttpAPI.HyperVController.<StartAsync>d__7.MoveNext() in C:workspacesPR-15633srcgithub.comdockerpinatawinsrcDocker.BackendHttpAPIHyperVController.cs:line 42
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
stack overflow How to run Docker Desktop with Windows Containers on Amazon AWS EC2 Windows (or is this not possible)?
原文答案

答案:

作者头像