zokradonh/kopano-docker

Multiple webapp plugins trigger errors on build

Closed this issue · 3 comments

Versioning fails if multiple webapp plugins are defined in .env.

Reason:

ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$ADDITIONAL_KOPANO_WEBAPP_PLUGINS

This line as it is currently allows use in Makefile but fails in version.sh:

/tmp/kopano-docker-env.BL8re3: line 91: kopano-webapp-plugin-spell-de-de: command not found

With enclosed quotes allows use in version.sh but then fails in Makefile:

--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=""kopano-webapp-plugin-spell kopano-webapp-plugin-spell-de-de kopano-webapp-plugin-spell-en"" \

sh interprets the quotes but make takes them literally on include.

Hi @zokradonh,

yes I have already came across the point that the way of handling some values in .env is not really practical when this file is also sourced by some of the bash script.

the current solution for this is https://github.com/zokradonh/kopano-docker/blob/master/setup-update-tag.sh#L16-L23, but maybe this needs a different handling altogether.

Ok, so we have three consumers of the .env file?

  1. Some bash scripts
  2. Postfix docker-compose
  3. Makefile

You have to replace postfix by docker-compose. It's just primarily the mta image depending on unquoted variables. The quick fix would be moving these values into the dedicated per container env files.