Reputation: 21
I have a GUI-less server (fresh Debian without any desktop environment or Ubuntu server, without X server, a priori). I consider to install docker and pull an official Ubuntu based container and add a desktop environment on it in order to use regular GUI apps.
I have a second computer in the LAN with a regular Debian Xfce or Xubuntu.
Is it possible to use this second computer to open the desktop session of the container (which is run on the GUI-less server) ? (I would like to use standard Debian or Ubuntu packages as much as possible and avoid to use external PPA packages)
Small state of the art :
I have seen the NoMachine solution : Build and Deploy NoMachine Desktops and Applications in Docker for Linux https://www.nomachine.com/DT10O00161
I have also seen the Consol docker images like : consol/ubuntu-xfce-vnc https://hub.docker.com/r/consol/ubuntu-xfce-vnc/
I also have seen a solution using Xvfb and x11vnc (sorry it is a french webpage but I expect the translation to be ok with regular onlie tools) : Utiliser VNC comme interface graphique avec un conteneur docker https://www.geeketfier.fr/post/docker-display-on-windows/
Upvotes: 0
Views: 3021
Reputation: 15947
One way to do it is to run a VNC server along with the GUI application you're interested in inside a container like you list as your last option. Then you can connect to it with VNC. (Or with HTTP(S) if you also install noVNC). kasmweb/chrome is one such option (http only, no VNC exposed). It even has a demo so you can easily try it out.
One problem you're likely going to run into at some point is that Ubuntu is moving towards having all the interesting GUI applications run in snaps. And snaps don't work well under docker. This is what my question How to safely and easily run snap-based applications in Ubuntu under docker? is about. If you're happy to run debian-based containers instead of ubuntu-based containers, this is perhaps less of a problem.
Upvotes: 0
Reputation: 21
I found this docker image which solves my question : docker-x2go-xubuntu : https://hub.docker.com/r/paimpozhil/docker-x2go-xubuntu
I built it on the GUI-less server and ran it as explained on docker hub.
On my second computer I opened an ssh tunnel to the GUIless server pointing to the docker interface :
ssh -CY -L 33333:container.docker.ip:2222 -l guilessuserlogin guiless.server.ip
(I retrieved the container IP by ifconfig on the GUIless server)
On this second computer I installed x2goclient from the regular repositories and configured a session to connect to localhost:33333
Once connected, the GUI desktop of the docker machine is completely available.
Upvotes: 2