I'm a bit stuck. There are lots of posts how to expose your host display to docker containers. None of them seems to work for me or I'm doing something wrong.
The situation is as follows:
I have a host linux machine H which is running a docker container C. The host machine H doesn't have x-server. I'm starting a new terminal window on my desktop machine D and type:
desktop_D:> ssh -X machine_H
machine_H:> export XAUTH=/tmp/.docker.xauth
machine_H:> xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
machine_H:> docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH opensuse-image /bin/bash
inside_docker:> xterm
xterm: Xt error: Can't open display: localhost:16.0
If i'm running docker on my desktop machine - everything works fine. I guess something is not right when passing display to docker. Any help would be appreciated!
P.S. I guess an approach with having a SSH server running in the container should change something - but that's ugly.