How to Display GUI on Xming from a docker container

  • I have Xming running on Windows 10
  • I ssh with x-forwarding into a Linux host
  • Running an X-app on the host displays on Xming
  • I run a docker container and I can not run an X-app in the container and get the following error:
    woodbri@cde8378da215:~$ display
    display: unable to open X server `localhost:13.0’ @ error/display.c/DisplayImageCommand/426.

I run docker like this:
sudo docker run -it
–user=$(id -u)
If I start the container using --net=host then I can connect, but this does not seem to be a safe option to use.


How do I tell docker to send X11 stuff through the ssh X-forwarded connection on the host?