SSH into mobylinux (docker for windows)

#based on po75558Manuel Patrone comment on https://forums.docker.com/t/how-can-i-ssh-into-the-betas-mobylinuxvm/10991/8

#get a privileged container with access to Docker daemon

docker run —privileged -it —rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh

#run a container with full root access to MobyLinuxVM and no seccomp profile (so you can mount stuff)

docker run —net=host —ipc=host —uts=host —pid=host -it —security-opt=seccomp=unconfined —privileged —rm -v /:/host alpine /bin/sh

#switch to host FS

chroot /host