Docker (für EGroupware)?
This contribution is (not yet) never completely finished. Smaller additions will follow…
The default groupware installation uses Docker from Version 19.1 onwards. This is used to decouple the EGroupware installation from the host system and allows additional services to be set up on the host system.
This article is intended to answer the following questions:
- Why Docker?
- What ist Docker?
- How does EGroupware work in Docker?
- How is the interaction after the update to 19.1?
Why Docker?
Short form:
- Enables an optimally configured installation (performance/security)
- Additional services can be easily integrated
-
Rocket.Chat and Collabora Online /CODE are delivered with 19.1. (1)
- It can be quickly/easily reset to an older state
- The dependencies between the host and the applications are avoided.
(1) A standard installation includes Collabora Online. Other items such as Rocket.Chat are installed after the network/DNS/SSL configuration. This enables a secure installation and saves some subsequent configuration.
In detail:
What is Docker?
Docker is a container virtualizations solution. It is currently the most common virtualization solution for delivering application containers. Container virtualization has a long history on Linux servers (vServer, OpenVZ, LXC) and is now also available for Windows (Docker).
The fundamental difference to full virtualization solutions (XEN, KVM, Hyper-V, …) is the property that essential parts of the host operating system (kernel) are also used. This keeps containers " leaner " and have even less " Losses " (Docker: ~1%) due to virtualization.
The Docker software is relatively lightweight and requires few resources on the host (disk space/RAM/CPU). The containers usually contain the complete application including e.g. the web server. Nevertheless, the containers remain slim, since only the most necessary things are installed.
Within a container it is now possible to work with different PHP versions, for example. Up to now, there have always been problems when different services required different PHP versions.
EGroupware in Docker
EGroupware comes as a container with a current PHP (08.2019: PHP 7.3) and a NGINX (08.2019: 1.16) on a Ubuntu (08.2019: 18.04). The PHP in combination with the FPM configuration of NGINX provides an optimal performance. The state of the software ensures the highest possible security.
Thus an optimal configuration is delivered and kept up to date by updates of the container.
This container only contains the EGroupware application. The database, files from the file manager, and EGroupware backups remain on the host. This means that the container can be easily exchanged during an update.
Another container “watchtower” is installed. This container has only the task to check at night at 04:00 o’clock whether there are updates of the containers. If there are any, they will be downloaded and “installed”.
This automatic can be switched off.
If problems are detected after updating the EGw container (EGroupware update), you can quickly and easily return to the previous version.
Docker will enable additional containers with supplementary services to be delivered and integrated into EGroupware in the future.
As of 08.2019 containers for Rocket.Chat and Collabora Online are included. If these are not desired, they can be uninstalled or deactivated. If the containers are not to be installed, this can also be configured.
Docker: Upgrade 17.1 => 19.1
The system requirements of 17.1 for the upgrade and the requirements of 19.1 are documented.
With an update from 17.1 to 19.1, the following is executed:
- Docker will be installed,
- the containers are downloaded,
- The containers are started,
- the necessary configurations from the web/proxy server are made.
With the reverse proxy, the individual services can be accessed from outside under one address. The SSL configuration then only needs to be set up on this reverse proxy. Not on each service individually.
See also: SSL Encryption with Let’s Encrypt
A graphic for illustration:
This shows an upgrade of a 17.1 standalone installation behind a router with SSL configuration on the web server. Other constellations may look different and may therefore run differently during the upgrade.
Docker tools
I have written a topic about it:
https://help.egroupware.org/t/uk-docker-tools/74121
Further links:
EGroupware:
GitHub EGroupware Wiki: 19.1 Installation using egroupware docker RPM DEB package
GitHub EGroupware Wiki: 19.1 Release notes and distribution specific instructions
Lecture from the Kielux 2021: Docker for EGroupware
Video in German, but slides translated to English.
More Docker:
Microsoft: https://docs.microsoft.com/de-de/dotnet/architecture/microservices/container-docker-introduction/docker-defined
Red Hat: What ist Docker?
Good collections of links on Docker:
https://www.my-it-brain.de/wordpress/linksammlung/
DevOps Cycle - The Ultimate Docker Cheat Sheet
If you have any questions or suggestions regarding this post, please post a topic in the forum.