How to run a GUI application from linux container in a window using Docker?

I have a QT-based GUI application that I compiled in docker (centos image). I can run the GUI application from within the Centos image on my Linux machine (OpenSUSE 13.2) By following the instructions on this blog " http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker "

The same thing that I want to do through window.I installed window docker. I uploaded the desired centos images with my GUI, and through the terminal I tried to launch the GUI using the container. It gives the error message "gui: cannot connect to X server"

Any idea or solution.

+4
source share
2 answers

There was a similar discussion of docker-release 8710 , but for MacOS:

A somewhat crude way to do this:

Run socatto open local socket xquartzon TCP port

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

(Note: for Windows you will need at least:

Transferring the display to the container (provided that the virtual host is available at 192.168.59.3):

 docker run -e DISPLAY=192.168.59.3:0 jess/geary

(This is unsafe on public networks, add options bind, suand rangein socat to restrict access.)

+3
source

I started vncserver and then saw my application with vncviewer.

+2
source

Source: https://habr.com/ru/post/1584448/


All Articles