feat(cloud.k8s): Improve build speed and size of LocalNodeImage by chaning module install order
This changes the order of layer in the LocalNodeImage
Dockerfile by first copying only the files needed to do a yarn install or npm install, then copying the rest of the source files over. This means that the layer with node_modules (which is very large) can be cached, and need only be rebuilt when package.json
, or a *.lock
file changes. This should speed up incremental builds and pushes by quite a bit, especially if the push is remote. It also saves disk space.