How can you run GUI applications in a Docker container?
Are there any images that set up vncserver or something so that you can - for example - add an e
The other solutions should work, but here is a solution for docker-compose.
To fix that error, you need to pass $DISPLAY and .X11-unix to docker, as well as grant the user who started docker access to xhost.
Within docker-compose.yml file:
version: '2'
services:
node:
build: .
container_name: node
environment:
- DISPLAY
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
In terminal or script:
xhost +si:localuser:$USERxhost +local:dockerexport DISPLAY=$DISPLAYdocker-compose up