3. May 2019

How to install Fluxbox on Centos in Docker

Repositories which are referenced in the base image of Centos does not contain any package with lightweight X window manager like Fluxbox. If you try to install it, you’ll end up with the following error:

Warning: No matches found for: fluxbox
No matches found

It’s sufficient to add EPEL (Extra Packages for Enterprise Linux) repository:

yum --enablerepo=extras install epel-release

Let’s test this whole setup on Docker image. We will install also TigerVNC server to view the Fluxbox UI:

docker run -p 5901:5901 -it centos /bin/bash
yum -y --enablerepo=extras install epel-release
yum install -y fluxbox tigervnc-server xterm
mkdir -p ~/.vnc
echo "fluxbox &"> ~/.vnc/xstartup
chmod u+x ~/.vnc/xstartup
vncserver

Now connect by your VNC client (e.g. RealVNC) to localhost:5901. The result should look like this:

30. April 2019

How to run Fedora GUI in Docker – just 6 commands

Docker is great for experimenting and testing server an applications. But what about GUI? How is it possible to run application which requires GUI in Docker container?

There are several ways how to access GUI application from the container. E.g. using ssh tunnel with X-Forwarding. The downside of this approach is speed and responsiveness of UI.

Much better responsiveness has TigerVNC server with VNC client.

Let’s pull and run Fedora image. We will also open a port 5901 where we can connect with VNC client:

docker run -p 5901:5901 -it fedora /bin/bash

Now install some basic applications. We will use TigerVNC server to serve the UI. Then we will use Fluxbox as a window manager because it’s small and versatile. We will need also xterm to invoke our commands.

yum -y install fluxbox tigervnc-server xterm

In a classic desktop installation of Fedora we’re using Display manager which allows to type user’s login. This is not necessary for Docker and instead of starting XServer we will launch TigerVNC server which will launch Fluxbox for us.

Write following configuration to ~/.vnc/xtasrtup:

mkdir -p ~/.vnc
echo "fluxbox &"> ~/.vnc/xstartup
chmod u+x ~/.vnc/xstartup

Now we can start the VNC server:

vncserver

It will prompt you for a password for protecting the connection. Just enter a password of your choice.

The server will automatically bind to 5901.

Now let’s start VNC Client on the host machine (I recommend RealVNC, because it’s fast and easy to use) and connect it to localhost:5901.

Here is the result:

If you need to invoke context menu in Fluxbox just right click with mouse.

You can stop TigerVNC server by command:

vncserver -kill :1

21. August 2017

Docker deploy DAB failed on Windows 10: service needs ingress network

Deploying application bundle to Docker Swarm (v17) is pretty straightforward. Simple command on Manager node:

docker deploy georgiktest --bundle-file .\georgiktest.dab

Unfortunately, it failed with message:

Loading bundle from .\georgiktest.dab
Creating network georgiktest_default
Creating service georgiktest_client
Creating service georgiktest_server
failed to create service georgiktest_server: Error response from daemon: rpc error: code = FailedPrecondition desc = service needs ingress network, but no ingress network is present

Solution that worked for me:

docker system prune
docker network create --ingress --driver overlay ingress

Thanks to cabloo for the solution.