modify container run command

⚠️ WARNING ⚠️

  • mounting /tmp/.X11-unix directly is convenient but has some potential drawbacks:
    • you might want to (or need to) preclude MIT-SHM usage, see recommendations here
    • you might want to use something like x11docker for a more involved (and security focused) approach to running graphical applications inside containers
# add to volume mounts
-v /tmp/.X11-unix:/tmp/.X11-unix
 
# add to env variables
-e DISPLAY=unix:0
 
# (optional, depends on use case) add to devices
--device /dev/dri:/dev/dri