在Windows虚拟机中运行Docker [英] Running Docker in Windows Virtual Machine
问题描述
使用:
- 适用于Windows 10的Docker桌面
- 从MobaXterm到Windows 10 VM的RDP
- 硒3.141.59
我目前正在尝试在docker容器中运行Selenium Grid,但遇到一些问题.我的PC和VM上都启用了Hyper-V和Containers.
I'm currently trying to run a selenium Grid within a docker container and I'm encountering some issues. I have both Hyper-V and Containers enabled on both my PC and the VM.
问题在于,与以前的同事不同,我使用的是Windows VM,而不是Linux.当我尝试在虚拟机中运行docker时,它说我需要启用嵌套虚拟化.
The problem is that unlike my previous coworkers, I'm using a Windows VM instead of a Linux one. When I try to run docker within the virtual machine it says that I need to enable nested virtualization.
这是正确的吗?还是我不应该在VM上而是在物理机上运行Docker?
Is this correct or should I not even be running Docker on the VM and instead on my physical machine?
推荐答案
Windows上的Docker要求VM能够运行docker守护程序(Virtualbox或Hyper-V),因此您可以选择在另一个VM内运行VM,这就是为什么您需要嵌套虚拟化的原因.
Docker on Windows requires a VM to be able to run the docker daemon (Virtualbox or Hyper-V) so in your choice you are running a VM inside another VM, thats why you need nested virtualization.
Docker Desktop已通过VM与主机隔离,您无需运行其他VM实例.
Docker Desktop is already isolated from the host with a VM, you don't need to run an additional VM instance.
这篇关于在Windows虚拟机中运行Docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!