Docker Community Forums

Share and learn in the Docker community.

Running GUI-based apps in Docker

I’ve been working on a GUI-based app that I’d like to transport between various Linux machines without having to recompile. So far, that sounds like an ideal Docker app. The catch: It’s a GUI-based app. From what I know, GUI is not Docker’s strong suit.

Q: Is this something that can be done with reasonable effort, or should I be looking at some other virtualization method?

Running GUI Applications inside Docker Containers
share the Host’s XServer with the Container by creating a volume.
–volume="$HOME/.Xauthority:/root/.Xauthority:rw"
share the Host’s DISPLAY environment variable to the Container.
–env=“DISPLAY”
run container with host network driver with.
–net=host.