Kerberos.io available on Docker

From today Kerberos.io is available on the docker hub. This will allow our users to install Kerberos.io with ease and in a very short time frame (a few minutes). Bye bye complex compilation and configuration tasks; this means video surveillance for everyone, hurray! Another advantage by using docker with Kerberos.io is scaling, a container can be created for every camera.

What the hell is Docker anyway?

Docker is an open-source project (released in 2013) that automates the deployment of applications inside software containers. Docker is often confused with a traditional VM (Virtual Machine).

Docker provides an integrated technology suite that enables development and IT operations teams to build, ship, and run distributed applications anywhere.

The idea of Docker, in comparison with a VM, is to run containers directly on the OS. This has some advantages: resources are acquired by the containers when needed; virtual machines take a fixed block of resources. A container contains a single, isolated and independent application. If we take Kerberos.io for example, we will have two containers:

  • The web container,
  • and the machinery container.

Kitematic

Docker comes with an out-of-the-box toolkit, which contains a GUI named Kitematic. It's a simple interface to search for applications on the docker hub. With just a few clicks, you can run and deploy, the most awesome and complex applications.

Kerberos.io on Docker

Docker compose

While Kitematic is great for setting up simple applications, simple in terms of "no dependencies", it doesn't allow you to execute more complex configurations. If you have two containers which need to communicate with eachother, you need to add some additional configuration; e.g. a webserver and a database. Luckily Docker has added a new tool, docker-compose, which allow you to run and configure multiple containers with a single command.

Run kerberos.io with docker-compose

To run docker-compose, you'll need to start the docker terminal. This will open the terminal (OSX) and inject some docker specific environment variables.

Kerberos.io on Docker

To use and run docker-compose a configuration file in the current working directory is needed docker-compose.yml. In this file you need to define the different services you want to run, which ports you want to expose or the volumes you want to share. You can find an example of a docker-compose.yml file for Kerberos.io beneath.


machinery:
    image: kerberos/machinery
    ports:
    - "8889"

web:
    image: kerberos/web
    ports:
    - "80"
    volumes_from:
    - machinery
    links:
    - machinery

The compose file contains two services, the machinery and web. Each service contains one or more configuration options:

  • image: this is the name of the image from the docker hub.
  • ports: the service can expose on or more ports (e.g. a webserver runs on 80 by default).

You can find more information about the different options on the docker website. When the compose file is created, you can run docker compose; note that you name the file correctly "docker-compose.yml". Docker will download the images and configure the different containers; BOOM!


docker-compose up

When opening Kitematic you will see two containers running; web and machinery. When selecting the web container, you can open the Kerberos.io web application.

Kerberos.io on Docker

Congrats, you've just created your own surveillance system!

Kerberos.io on Docker

Hey, I'm Cédric a software engineer, who's motivated to broaden his horizon and to discover and learn new methodologies. With a huge interest in web technologies, artificial intelligence and image processing, I try to understand our mountainous world a little bit better.