-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
None
Currently, the image goal creates the application image by COPYing the provisioned server + the deployment in a single layer.
This is inefficient as this layer will needs to be rebuild every time the image is updated.
Instead, we could use 2 different COPY commands:
- COPY the server bits. This Docker layer can be cached (as long as the
server provisioning does not change) - COPY the deployment. This Docker layer is small (the size of the
deployment) and will be changed every time
With that optimization, repeatedly pushing the application image will
mean to push the deployment Docker layer only (a few kb instead of several MiB)
This optimization saves time, bandwith and storage when the image is pushed to
the container registry.