Here’s a first report on trying to add Guacamole to Labtainers in order to allow running Labtainers in a headless way, without an X display, in containers, and accessing the GUI in a Web browser, through the use of VNC and Guacamole.
We’ve casted a demo of it :
This aims at allowing similar use cases as for the execution of labs on the cloud (“virtual labs”), and uses the same remote display connection mechanism, I’ve already blogged about in the case of CloVER (Guacamole)
To repeat our efforts, we’ve been working, together with Thomas Gonçalves, in order to test the feasability of running Labtainers in a “headless” way, in containers, accessing the display through a Web browser. This corresponds to what I’ve described in https://github.com/mfthomps/Labtainers/issues/8
Under the hood, it reuses the approach of using a “master” container running the core of labtainer scripts (see my previous post), which is highly insecure, but helps us test it.
The architecture we’ve tested is as follows :
- the “labtainer.master” container runs the Python scripts, and starts a VNC server (TigerVNC) which in turn runs bits of an XCFE session. The labs will be started in the X DISPLAY of that session (displaying the gnome terminals and such).
- the “guacamole.labtainer” container runs Guacamole (using Jetty for the internal Web server), which includes guacd, the proxy that sits between a Web canvas and the VNC server of the other container. Guacamole has been setup to use a minimal set of resources, like no DB, etc.
When you connect your browser to a URL on the guacamole.labtainer container’s IP, you display the labs \o/
The current use case would typically be running these and the labs’ containers on a IaaS VM (which acts as a sandbox for running docker containers in a secure manner), without a full X desktop on that VM, and accessing the VM’s guacamole via HTTPS from outside the Cloud.
Guess what, even thoigh we had only tested that on Linux, it worked with almost no modification on Docker Desktop for Windows too.
You can find the Dockerfiles and scripts at : https://gitlab.com/olberger/virtual-labs/tree/master/labtainer-docker (and above), and the 2 container images have been put on the DockerHub by Thomas.
We’d welcome some feedback on whether you find this interesting.