Well, the article mentions an obvious improvement. The node_moduoes won't be rebuilt after any changes to the code, only changes specific to the packages.json.
Basically the main step is the COPY . . step (previously COPY . /app) which will invalidate the cache every change to the code.
Also that on the builder, the steps beyond npm run are not needed, but well they won't improve much on the performance or space of the overall process.
Comments
Well, the article mentions an obvious improvement. The node_moduoes won't be rebuilt after any changes to the code, only changes specific to the packages.json.
Basically the main step is the COPY . . step (previously COPY . /app) which will invalidate the cache every change to the code.
Also that on the builder, the steps beyond npm run are not needed, but well they won't improve much on the performance or space of the overall process.
But that's only if the builder image gets cached and can be reused, right?
Correct.