SSH with X11 forwardingVNC- share X11 socket
$ docker run -ti --rm -e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority --net=host myimage xterm
add alias to .bashrc
$ alias dockerx11run='docker run -ti --rm -e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority --net=host '
$ dockerx11run myimage xterm
References :
Running GUI apps with Docker – Fábio Rehm
沒有留言:
張貼留言