COPY . . or npm install

I am not sure I see the benefit of npm install vs COPY node_modules/. There is a delay when starting the image or building it in either case…

Well some packages wouldn’t work if the machines were running different operating system, OS versions,or different 64-bit vs 32-bit. That’s why we need to install them in docker because it uses different OS.

1 Like