Running Docker in Windows Virtual Machine

Zontar picture Zontar · Mar 18, 2019 · Viewed 8.1k times · Source

Using:

  • Docker Desktop for Windows 10
  • MobaXterm to RDP into a Windows 10 VM
  • Selenium 3.141.59

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.

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.

Is this correct or should I not even be running Docker on the VM and instead on my physical machine?

Answer

codestation picture codestation · Mar 18, 2019

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 is already isolated from the host with a VM, you don't need to run an additional VM instance.