As docker documentation suggests boolean values in a docker-compose file should be enclosed in single quotes to avoid misinterpretation by the YAML parser. I have docker-compose file that populates some of the values with environment variables of the shell where it gets invoked
myservice:
environment:
- firstvar: ${MY_FIRST_VAL}
- ...
- booleanvar: ${MY_BOOLEAN_VAL}
MY_BOOLEAN_VAL can be either true or false and is exposed via a config file.
I tried '${MY_BOOLEAN_VAL}' and "${MY_BOOLEAN_VAL}" instead of ${MY_BOOLEAN_VAL} hoping for docker stack deploy to force a bash-like mechanism for neutralising the YAML parser to no avail.
How can I pass a boolean value using an environment variable to compose file?