Docker for GUI-based environments?

后端 未结 8 829
耶瑟儿~
耶瑟儿~ 2020-11-27 12:45

Problem

I have a set of client machines that are a part of an enterprise web application. Each machine runs identical software, which is a PyQT-base

8条回答
  •  一个人的身影
    2020-11-27 13:05

    There are many solutions to have GUI apps running in a docker container. You can use SSH, or VNC for instance. But they add some overhead and delay. The best way that I found is just to pass in the file used by the X server in the host machine as a volume to the container. Like this:

    docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY TheImage
    

    Then all your GUI apps will run from container.

    Hope This helps!

提交回复
热议问题