I have:
- Remote server that runs Docker container and a SSH daemon
- My own computer that can run Docker container and connect to the remote server through SSH with X11 forward
From my computer, I would like to open a GUI application located in the Docker container located in the Remote server.
If I run the Docker container in my own computer, I can open GUI app without any problem.
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --env="QT_X11_NO_MITSHM=1" ...
If I run the container in the Remote server through SSH. I get:
myapp: cannot connect to X server localhost:10.0
I guess there is another configuration to be able to share the virtual display created by the SSH connection to the container.
I am not running any SSH server in the Docker container and I don't want to.
How can I share the SSH X11 forward display with a Docker container?
- If possible with a transparent way, no matter I run the container in local or remotely through SSH.