Is there yet any native or commonly-accepted approaches to using environment variables to control Docker behaviour, i.e. in a 12factor manner?
The only language-agnostic method I've seen is to pollute the docker run command with -e variables. The most maintainable solution I've seen is using a combination of cat and sed to generate the CLI parameters using a .env file: https://twitter.com/DataKyle/status/422843345120296960
We currently use Vagrant for dev, a CI/CD hosted provider for test and deploy, plus AWS Elastic Beanstalk as the Staging and Production PAAS. Our app has over 100 configurable parameters, most of which are set to defaults, but each environment still needs to customise around 10-20 of those. It just seems too hacky to be running docker with a huge list of command-line variables like that.
Further, it doesn't allow you to take variables from the docker host (such as the CI provider's pre-installed Redis or Postgres credentials), without a further hack.
Is there a solution to this I haven't found? Or is this a missing piece for Docker? Or is this somehow philosophically against the Docker philosophy?