DockerFeaturedNascom

Running XBeaver with Docker

XBeaver can be downloaded and compiled with make on linux. However, with my linux of choice being Arch Linux and my laptop being a Macbook Pro I found myself struggling to compile it. Arch was just too new, and my Mac wasn’t Linux.

I tried using a distribution such as CentOS within Virtualbox on my Mac which worked but was slow and regularly stopped working. In the end I came up with a much better solution by running XBeaver in a Docker Container on my Mac. Docker works with Windows and Linux so the following should also work for those platforms with perhaps only minor changes.

The docker image contains a CentOS distribution with the Icewm window manager, a VNC server and XBeaver. It is heavily based on the consol/centos-icewm-vnc container and my thanks go to the developers of this.

Docker can be downloaded from https://docker.com and once installed the following command issued from the host will download and run the xbeaver container.

   $ docker pull johnnewcombe/xbeaver

The following command will run the docker image in a container and bind the container’s ports 5901 and 6901 to the host’s ports 5901 and 6901 respectively. This will allow the image to be accessed via VNC or in a Web Browser over HTML.

   $ docker run -d -p 5901:5901 -p 6901:6901 johnnewcombe/xbeaver

Connect using a VNC client using the address localhost :5901 or via a Web Browser on http://localhost:6901. The password is vncpassword.

Once access is gained a terminal session sould be visible, if not, ‘right clickingr the desktop will allow one to be launched.

The xbeaver compiled binary and source code is located in /headless/xbeaver within the container and can be run from there, although I find it convenient to copy the compiled binary xbeaver*.cfg and *.dsk files to the /root/xbeaver directory (within the container) and bind this directory to a directory on my machine. This allows config files and disks etc. to be managed directly with the host machine. To run the image with the container’s /root/xbeaver directory mapped to a directory on the host machine, use a command similar to the following. In the example below the container’s directory /root/xbeaver is mapped to the .xbeaver directory on the users home drive.

$ docker run -d -p 5901:5901 -p 6901:6901 -v ~/.xbeaver:/root/xbeaver --name xbeaver johnnewcombe/xbeaver

More details of the image can be found on Docker Hub see https://hub.docker.com/repository/docker/johnnewcombe/xbeaver.