xhost +local:docker
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix ...
Every now and then I want to run X apps inside docker, and then I always hit some issues.
Here are all the options that might need to be set:
- Allow docker to connect to X
xhost +local:docker
- DISPLAY
pass into Docker with -e DISPLAY=$DISPLAY
- X socket
share with Docker with -v /tmp/.X11-unix/:/tmp/.X11-unix