My contributions to the Kitematic project

Posted by ZedTuX 0n R00t on June 25, 2015

A very short article to summarize my contributions to the Kitematic project, an easy and sexy user interface for Docker.

Linux support

My first contribution is the Linux support. I’m running Debian on my iMac since using Docker on OSX is too slow (running a cucumber feature file was taking up to 30 seconds before to execute entirely the first step …) so I couldn’t do anything else without this done.

This task wasn’t hard as it was composed of only 2 points:

  • Skipping the installation wizard (Kitematic automatized the VirtualBox, boot2docker, docker-machine, etc.. installation)
  • Configure the dockernode library to use the local docker server using the unix socket

I have started this task like “Well … how hard could be this to be done ?” and the day after I was communicating about my working fork.

Couple of people enjoy my pull request (on the pull request and in the original issue).

A configurable ‘Debug’ tab

Now that Kitematic was running on my Linux box, I wanted to use some images like Irssi, Rainbowstream or Spotify from Jessie Frazelle’s Github repo, but when I’ve tried the first one, I needed to mount a volume which wasn’t defined in the Dockerfile so I was blocked.

Looking around in the Kitematic issues I’ve found the issue 376 from Jeffrey Morgan, one of the 3 main developers of Kitematic. While working on this task, I was bored to copy/past the output from the console of the Docker server JSON in jsonlint in order to format it quickly so I have developed a developer tool.

As described in the pull request, now you have a checkbox to enable the debug mode which will add a Debug tab to the selected container which will show you the formatted JSON.

Now, after having performed an action which update the container configuration, I can easily checkout how the JSON looks like in order to check if the configuration is fine. This allowed me to discover and solve a bug in Kitematic when trying to update the Binds configuration of a container.

Allow mounting custom volume directories

Finally the last contribution as of today is the possibility to add/remove volumes in a container no matter if they have been defined in the Dockerfile or not used to build the image (actually Volumes in Docker aren’t linked to the Dockerfile at all here).

Docker is an amazing peace of software ! It has been developed in a beautiful way as you update a container by posting on a REST API. What could be more easy ? It’s the best IPC way in my opinion.

Anyway the development was more than the half about the UI than the container update. Have a look at the pull request where I’m describing carefully the way to use it.