for the base image, which is still small but allows us to use plain Unix  cp  command for this task. So how does the initialization of shared volumes with configuration work under the hood? Let’s have a look at an example. First, we need to create a configuration image again with a Dockerfile, as in Example 20-5. The only difference from the vanilla Docker case in Example 20-1 is that we have a different base image and we add an  ENTRYPOINT  that copies the properties file to the directory given as an argument when Docker image starts. This image can now be referenced in an init container within a Deployment’s  .template.spec  (see Example 20-6). 160  |  Chapter 20: Immutable Configuration Example 20-6. Deployment that copies configuration to destination in init container Example 20-5. Development configuration image Using a shell here in order to resolve wildcards FROM busybox ADD dev.properties /config-src/demo.properties ENTRYPOINT [ "sh", "-c", "cp /config-src/* $1", "--" ] initContainers : -  image : k8spatterns/config-dev:1 name : init args : - "/config" volumeMounts : -  mountPath : "/config" name : config-directory containers : -  image : k8spatterns/demo:1 name : demo ports : -  containerPort : 8080 name : http protocol : TCP volumeMounts : -  mountPath : "/config" name : config-directory volumes : -  name : config-directory emptyDir : {}