Connect with ssh to docker daemon on Windows

As far as I know you can't connect to the docker VM using SSH and you cannot connect to the console/terminal using Hyper-V Manager either. https://forums.docker.com/t/how-can-i-ssh-into-the-betas-mobylinuxvm/10991/17


Run this:

docker run -it --rm --privileged --pid=host justincormack/nsenter1

Just run this from your CLI and it'll drop you in a container with full permissions on the Moby VM. Only works for Moby Linux VM (doesn't work for Windows Containers). Note this also works on Docker for Mac.

Reference: https://www.bretfisher.com/getting-a-shell-in-the-docker-for-windows-vm/