How to run apps in containers (cinit)
Usually it is best practice (and a core design principle of Docker) to run only one application inside a Docker container. After long discussions inside the VIS IT and their decision to break with this principle VSETH IT decided to explicitly break with this principle for maintenance reasons:
- Many developers in VSETH don't have a lot of experience with docker so multiple images per logical application makes their life harder
- To support applications containing multiple images (in potentially multiple repositories) clear standards for the interactions of these repositories would have been needed.
- Such interactions are hard to enforce inside a vibrant organisation like VSETH
- It has a big potential to get messy very fast if people don't stick to the rules
- People often have to understand applications that they are not familiar with. It was an important aspect to have a clear place where to look in order to understand a application.
- VSETH does not need to scale parts of applications independently (they are just idle most of the times anyway)
Given this it was decided that logical associated applications, e.g. the typical setup of a application server and a web server, are put into the same Docker container and even more important: Inside the same git repository.
Important
Inside SIP all programs that are needed to run one logical applications are put into the same git repository and in the same Docker image!
Since this core decision breaks with different assumptions it was needed to put a custom container init system (cinit) in place. This system is free software and can be found in its repo on gitlab.com.
Additional Information
See the project description (German) for more details about the decision process and the design principles.