I'm trying to connect to the remote server with docker. Basically, I need a real physical display to run GUI tests. Now, the issue is that the server doesn't have a physical Monitor so I'm trying to use X Forwarding to be able to connect to my PC with Monitor.
So what I've done so far: On the machine with Monitor.
1) $ touch /tmp/.docker.xauth
2) $ xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f /tmp/.docker.xauth nmerge -
3) rsync -aztP /tmp/.docker.xauth user@server_in_clouds:/tmp/.docker.xauth
4) echo $DISPLAY (returns :1)
On the machine in Cloud.
1) docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth --gpus=all -e DISPLAY=IP_OF_THE_MACHINE_WITH_MONITOR:1 -e NVIDIA_DRIVER_CAPABILITIES=all DOCKER_IMAGE xclock
After some time it says that it can't connect to the IP_OF_THE_MACHINE_WITH_MONITOR:1
Should I do anything else? I believe I'm missing something. Maybe it is not required to have a physical Monitor in centos in order to do so?