Univention Bugzilla – Bug 49647
Do not use environment variables names with '/' in key
Last modified: 2020-04-01 09:06:37 CEST
For multi container apps the App Center adds a bunch of environment variables to the compose file before it is used by Docker compose. See this excerpt: environment: - SERVER_ROLE=memberserver - server/role=memberserver - NAMESERVER_EXTERNAL=false - nameserver/external=false - UPDATE_SECURE_APT=false - update/secure_apt=false - LDAP_SERVER_IP=127.0.0.1 - ldap/server/ip=127.0.0.1 - LDAP_SERVER_TYPE=master - ldap/server/type=master - UPDATER_IDENTIFY=Docker App - updater/identify=Docker App - … The problem are the duplicate variables with small letters and the '/' in their key. The usual convention for environment variable names is capitals separated by underscore '_'. Variables in this format already exist. Docker apps may rely on this convention as now is the case with seafile now where the container refuses to start because it cannot parse the environment variable key correctly. With this issue the duplicate environment variable with the '/' in it (the UCR variable key format) should be removed from the docker-compose.yml created by the App Center on the UCS target host.
I added a new App Setting "DockerUcrStyleEnv" that can disable passing environment variables into docker containers that are not in format of capital letters and underscores. Successful build Package: univention-appcenter Version: 8.0.11-45A~4.4.0.201907231554 Branch: ucs_4.4-0 Scope: errata4.4-1
OK: if DockerUcrStyleEnv is false, the environment variables are only added with uppercase and underscore OK: default of DockerUcrStyleEnv is true (old behaviour) OK: single container: <app>.env file multi-container: docker-compose.yml OK: yaml -> verified
<http://errata.software-univention.de/ucs/4.4/200.html>