How to SSH into the Docker VM (MobyLinuxVM) on Windows

On Windows, Docker runs in a VM called MobyLinuxVM, but you cannot login to that VM via Hyper-V Manager. We aren’t technically going to SSH into the VM, we’ll create a container that has full root access and then access the file system from there.

  1. Get container with access to Docker Daemon
  2. Run container with full root access
  3. Switch to host file system

Open a Command prompt and execute the following:

You can then execute whatever commands you need to execute.

This code was found on the Docker forums here, thanks to Manuel Patrone for posting it.