Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RafaelPalomar/1d613e93e7b6b75ac8946889136cb946 to your computer and use it in GitHub Desktop.
Save RafaelPalomar/1d613e93e7b6b75ac8946889136cb946 to your computer and use it in GitHub Desktop.
How to run a dockerized application which uses the host Xorg for graphics #docker #xorg

Connection to local Xorg from a dockerized application

  • One must deal with the security of Xorg for accepting connections. It should be better ways, but the best I found is xhost +, which disables the security.

Command for running the container

docker run -ti --rm \
       --net=host --device=/dev/dri -e DISPLAY=$DISPLAY \
       -v /tmp/.X11-unix:/tmp/.X11-unix \
       <docker image>      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment