It should be along these lines:
- Install Ubuntu distro in WSL2.
- Create an ssh key pair on the Windows side using ssh-keygen.
In Ubuntu:
- Install Docker engine using Docker's apt-get instructions for Ubuntu.
- Add the ssh public key to ~/.ssh/authorized_keys.
In Windows:
- Run "wsl hostname -I" to get your WSL2 hostname.
- Test "ssh user@wsl-host", using the WSL2 hostname. It should work without prompting for a password.
- Unzip docker.exe somewhere.
- In your user environment variables, set PATH to include the directory with docker.exe, and set DOCKER_HOST to "ssh://user@wsl-host", using the WSL2 hostname.
That should be it; you should now be able to run docker normally from your Windows user, using file context from the Windows side.