zokradonh / kopano-docker

Unofficial Kopano Docker images for all Kopano services.
MIT License
59 stars 37 forks source link

Multiple webapp plugins trigger errors on build #216

Closed zokradonh closed 5 years ago

zokradonh commented 5 years ago

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

Reason: https://github.com/zokradonh/kopano-docker/blob/ae7f679be27c70350489e97a3b9704353d2ce178/setup.sh#L337

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.

fbartels commented 5 years ago

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.

zokradonh commented 5 years ago

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

  1. Some bash scripts
  2. Postfix docker-compose
  3. Makefile
fbartels commented 5 years ago

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.