18 Application configuration management in containers
Applications need to load their configuration from the environment they're running in - which is usually a combination of environment variables and files read from disk. Docker creates that environment for apps running in containers, and it can set environment variables and construct the filesystem from many different sources. The pieces are all there to help you build a flexible configuration approach for your apps, so when you deploy to production you're using the same image that passed all the test phases. You need to do some work to bring the pieces together, setting up your app to merge configuration values from multiple places. This chapter will take you through the recommended approach (and some alternatives) using examples in .NET Core, Java, Go and Node.js. Some of the work here lives in the developer space, bringing in libraries to provide config management, and the rest lives in that grey area between dev and ops which relies on communication so both sides know how the configuration model works.