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 in environment 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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -