Install either Xming or VcXsrv.
Once installed run XLaunch
- Select Multiple Windows
- Set Display to 0
- Select Start no client
- Check Disable Access Control
- Finish
First get your IPv4 address:
ipconfig
Under the Ethernet adapter vEthernet (WSL):
header there should be a line containing IPv4 Address
.
ip route
The first line should contain the IP address.
In the terminal run:
docker build -f Dockerfile.xeyes . -t xeyes
docker run --rm --name xeyes -e DISPLAY=<your_IPv4_address>:0.0 xeyes:latest
Or use a pre-built image: https://hub.docker.com/r/openiss/openiss-xeyes
docker run --rm --name xeyes -e DISPLAY=<your_IPv4_address>:0.0 openiss/openiss-xeyes:F22-01
If you see the xeyes program appear, that means graphics are working. (The xeyes example is not technically OpenGL, but more so X11 but allows for a quick test of graphical display from Linux to Windows).