docker compose - How to do variable substitution in env_file? -
i using docker-compose , want env_file have variable subsitution. define 1 variable in file , use in other variables:
app_env=dev-foo localpath=/tmp/builddir/${app_env} git_url=git@github.com:some-org/${app_env}
what supported form of variable substitutions in env_file???
variable substitution not supported in env_file.
your options are:
- use variables in
environment:
section (although wont able example because setting value inenvironment
sets container environment, , substitution happens on host). - use host variables specifying environment variable without value (ex:
localpath=
), may in either env_file or environment section.
Comments
Post a Comment