Lately there have been some work with the unofficial OTRS docker images with the help of some new contributors. I have added some improvements and some new Pull Requests have been merged (thanks for those !). I’m going to review the latest updates done to the images:

OTRS container

Docker secrets support

Merged PR #60 that adds support for docker swarm secrets, allowing to use files to store variable values instead of adding them as environment variables when in a docker swarm cluster.

Email sending configuration is more flexible

Merged PR #64 that makes OTRS SMTP settings completely configurable. Now these settings aren’t hardcoded to use this SMTP relay container to send emails (It is still added in the example .env file as an example if you plan to use it).
Now addtional to the SMTP server, port, username and password values, you can also set the email module to use, using the variable OTRS_SENDMAIL_MODULE=(SMTP, SMPTS, Sendmail) to one of the supported values by OTRS.
The reason why we are not setting a default anymore for this settings is because any setting set on Config.pm becomes read-only on the SysConfig GUI, and some people like using SysConfig instead of modifying configuration files.
So now if you don’t manually configure the SMTP settings, email sending will not work until you configure an SMTP server through SysConfig.

Major updates improved

 There also have been some improvements in the major version upgrade process: part of the code was reorganized to avoid some rare upgrade cases I was facing, now addons are upgraded before running the database upgrade script.
Also some new variables were added to improve the control during the upgrade:
  • New environment variable OTRS_UPGRADE_BACKUP=(yes|no) to enable/disable automatic backup before starting a major version upgrade. Default is yes.
  • Load additional sql files before db upgrade.
  • Added new environment variable OTRS_UPGRADE_XML_FILES=(yes|no) to enable upgrading of XML configuration files during an major version upgrade.

Some more general changes

  • Another new feature is that addons can be installed at container start. Just map  /opt/otrs/addons to a directory in your host, download the addons from whatever repository you like and put the .opm files there. The container will pick them up on boot and install them (and automatically upgraded when a new version of OTRS is released).
  • Also now all pasword values that are printed into stdout are masked by default so they aren’t displayed on container boot.
  • Merged PR #57 that adds a new variable MYSQL_ROOT_USER to configure the database root username that was hardcoded to root before.
  • Merged PR #66 that adds an example systemd service file to run the containers using docker-compose at server boot.

Database container

For a long time there was an issue with the database container when starting a new OTRS  service. The container expected the user owner of the database mount point to be the same as the user running the database process, so you had to manually set the correct permissions first on the docker host prior to starting it.

Now that’s not needed to be done, the container will work without the need to set up filesystem permissions. We also moved from CentOS/MariaDB image to the official MariaDB image.

That’s all for now, check the complete CHANGELOG for the complete list of changes done.