Skip to content

feat(cloud.k8s): Improve build speed and size of LocalNodeImage by chaning module install order

Manish Vachharajani requested to merge mvachhar/adapt:faster-node-build into master

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.

Merge request reports