Become Part of our Team and Push Digital Sovereignty
- Teamleader IT / Project Manager (m/f/x)
- IT Consultant (m/f/x)
- Outbound Sales Represantative (m/f/x)
- a.m.m.

Since the release of UCS 4.1 in November 2015, the App Center has supported Docker apps. These are applications in the form of Docker images that are deployed by the App Center in a Docker container. To do this, the App Center downloads the Docker image of an app and starts the Docker container. We call these apps “Single Container Apps” because the App Center only supports one container per app. This functionality is sufficient for many apps.
Until now! The app landscape is constantly changing and new app candidates like Rocket.Chat, Metasfresh and Zammad no longer consist of just one container. These apps are called “Multi Container Applications”. In order to fulfill the wish of many of our users to also find such apps in the Univention App Center and run them on UCS, the App Center now supports Multi Container Apps with the UCS 4.3 errata update 345, thus creating the necessary prerequisites.
A common approach to container virtualization, as implemented by Docker, is to provide individual services in individual containers. Probably the most common use case is the separation of application and database, such as Rocket.Chat. The number of containers is not limited to two, as Metasfresh shows.
If you want to learn more about the Docker technology itself, we recommend this short introduction:
Docker Compose, which is also used in the App Center, is used for multi-container applications in the Docker environment. Central element is the docker-compose.yml file. For Rocket.Chat it looks like this:
version: '2' services: rocketchat: image: rocketchat/rocket.chat:latest restart: unless-stopped volumes: - ./uploads:/app/uploads environment: - PORT=3000 - ROOT_URL=http://localhost:3000 - MONGO_URL=mongodb://mongo:27017/rocketchat - MONGO_OPLOG_URL=mongodb://mongo:27017/local - MAIL_URL=smtp://smtp.email depends_on: - mongo ports: - 3000:3000 mongo: image: mongo:3.2 restart: unless-stopped volumes: - ./data/db:/data/db command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 # this container's job is just run the command to initialize the replica set. # it will run the command and remove himself (it will not stay running) mongo-init-replica: image: mongo:3.2 command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"' depends_on: - mongo hubot: image: rocketchat/hubot-rocketchat:latest restart: unless-stopped environment: - ROCKETCHAT_URL=rocketchat:3000 - ROCKETCHAT_ROOM=GENERAL - ROCKETCHAT_USER=bot - ROCKETCHAT_PASSWORD=botpassword - BOT_NAME=bot - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics depends_on: - rocketchat volumes: - ./scripts:/home/hubot/scripts ports: - 3001:8080
These files in YAML format define various services. These services specify which Docker image to use and which environment variables, volumes, ports, and dependencies to other containers are required. In its entirety, it describes an application with all its parts that are started using Docker Compose.
App providers can store their Docker Compose configuration in the App Provider Portal, as the screenshot of Zammad shows.
App providers can store a whole range of configuration settings for the app in the provider portal. This also includes scripts that are executed at different stages during the app lifecycle in the container and on the host.
For Multi Container Apps, it must be specified which of the defined services or containers is the main service so that the App Center knows to which these scripts and some configurations have to be applied. As a rule, the main service is the container containing the application.
Before a Multi Container App can be put into operation on the user’s target system via Docker Compose, the docker-compose.yml is directly processed by the App Center on the UCS system and some points are changed or added.
/var/lib/univention-appcenter/apps/<appid>/data
and /var/lib/univention-appcenter/apps/<appid>/conf
directories on the UCS host. If volumes are also defined in the App Provider Portal in the app Configuration, these are also supplemented in the Docker Compose file by the App Center for the main service./etc/univention/base.conf
, as well as the password for the so-called machine account under /etc/machine.secret
, via which the main service has authenticated read access to the LDAP directory.As a result, Docker Compose starts a Docker Compose configuration on the target system that no longer matches 100% of the app vendor’s input. This is necessary because a lot of information must be available at the start of an app for optimal integration. Thus, the apps can adjust to the local environment and preconfigure themselves accordingly, so that users can start immediately. The modified Docker Compose file can be found on the UCS target system under /var/lib/univention-appcenter/apps/$apps/compose/docker-compose.yml
.
App providers can now directly start creating their Docker Apps in the App Provider Portal and store the Docker Compose configuration. The documentation will be published within the next days. And the first Multi Container Apps are already on their way and should be published in the App Center within the next weeks.
Nico Gulden studied applied computer science and works for Univention since 2010. As technical editor he is responsible for maintenance and expansion of the product documentation. His spare time is dedicated to his family, reading, outdoor activities like cycling, photography, Geocaching and voluntary work with children and young people.
The documentation has been updated. The part about multi container support is described under: https://docs.software-univention.de/app-provider.html#create-app-with-docker:compose
ReplyI thought, docker is docker. So i started with: docker save “name” > /path/filename
as i use to backup debian docker containers.
On UCS nothing will be written to filename, the hole server freeze, CPU-load gets high.
What is wrong with it?
Hello D.K.
thank you for the comment. On UCS we use the default Docker engine. From what I understand from the documentation, it saves Docker images. Is that your intention? Or do you want to backup a Docker container?
From the little input in this comment I cannot tell what’s wrong. I suggest to move this discussion over to Univention Help at https://help.univention.com/ and open a topic there. At first, I’m interested in answers to the following questions:
* What Docker image did you try to save?
* What does the docker daemon log say?
* What’s the docker version you are running?
* What UCS version are you using?
A quick search brought me to https://stackoverflow.com/questions/39664746/docker-save-produces-no-output which may relate to your observations.
Best regards,
Nico