VM、VDI 環境内での Docker Desktop for Windows の実行
一般的に Docker Desktop は、Mac、Linux、Windows のいずれかにおいてネイティブに実行することをお勧めします。 ただし仮想デスクトップが適切に設定できていれば、Docker Desktop for Windows を仮想デスクトップ内で実行することも可能です。
仮想デスクトップ環境内において Docker Desktop を実行するには、仮想マシン上へのネストした仮想環境が実現できるように、仮想デスクトップが機能していることが重要です。 というのも Docker Desktop は背後に Linux VM を利用しており、その環境内にて Docker Engine やコンテナーを動作させているためです。
仮想デスクトップサポート
メモ
Docker Business 利用者は、VMware ESXi または Azure VM についてのみ、仮想デスクトップ上での Docker Desktop の実行がサポートされています。
The support available from Docker extends to installing and running Docker Desktop inside the VM, once the nested virtualization is set up correctly. The only hypervisors we have successfully tested are VMware ESXi and Azure, and there is no support for other VMs. For more information on Docker Desktop support, see Get support.
For troubleshooting problems and intermittent failures that are outside of Docker's control, you should contact your hypervisor vendor. Each hypervisor vendor offers different levels of support. For example, Microsoft supports running nested Hyper-V both on-prem and on Azure, with some version constraints. This may not be the case for VMWare ESXi.
Docker does not support running multiples instances of Docker Desktop on the same machine in a VM or VDI environment.
Turn on nested virtualization
You must turn on nested virtualization before you install Docker Desktop on a virtual machine.
Turn on nested virtualization on VMware ESXi
Nested virtualization of other hypervisors like Hyper-V inside a vSphere VM is not a supported scenario. However, running Hyper-V VM in a VMware ESXi VM is technically possible and, depending on the version, ESXi includes hardware-assisted virtualization as a supported feature. For internal testing, we used a VM that had 1 CPU with 4 cores and 12GB of memory.
For steps on how to expose hardware-assisted virtualization to the guest OS, see VMware's documentation.
Turn on nested virtualization on an Azure Virtual Machine
Nested virtualization is supported by Microsoft for running Hyper-V inside an Azure VM.
For Azure virtual machines, check that the VM size chosen supports nested virtualization. Microsoft provides a helpful list on Azure VM sizes and highlights the sizes that currently support nested virtualization. For internal testing, we used D4s_v5 machines. We recommend this specification or above for optimal performance of Docker Desktop.