<p>Is there a way to do variable/file transforms in the *.config file of a docker image as it's deployed (to a Kubernetes cluster - AKS)?</p>
<p>This could be done by doing the replacement and creating a docker container image for each configuration but this would lead to a lot of extra container images when the only difference is the configuration file.</p>

Mark
<p>A Docker image is build as a readable/writeable layer on top of a bunch of read-only layers. These layers (also called intermediate images) are generated when the commands in the <code>Dockerfile</code> are executed during the Docker image build.</p>
<p>These intermediate layers are shared across the Docker image to help increase reusability, decrease disk usage, and speed up <code>docker build</code> by allowing each step to be cached.</p>
<p>So, if you create multiple images by changing the configuration setting, each image use the shared layers that are unchanged and only the changed configuration amounts to the extra size for the new images.</p>
<p>Alternately, you could define these configurations as <code>ConfigMap</code> if you use Kubernetes and mount them on the pod as volumes/environment variables.</p>
