DEV Community


Posted on

Docker Config PreProcessor

So, I keep on running into this issue time and time again. I need to dockerize an app, but the application doesn't follow the design or at the very least it's not allowing ENV overrides.

There are tools now that are agnostic to what format the config file is in. (yaml, json, .ini ) and is able to read the configuration in. is a great example and is another python example.

How does everyone else deal with updating configs that doesn't support env? I was thinking of writing a tool where my docker image just invokes a pre-processor that is ENV aware.


#!/usr/bin/env bash 
preprocess --config foobar.template


Wouldn't it be worthwhile to create something that adapts the config rather than updating the config by exposing it via volumes or doing weird sed/regex pre-processing?

Any thoughts?

Top comments (0)