How does build ONCE and run ANYWHERE concept work? For example for a node application, if I want to build an image, it will run 'npm install' to pull in dependencies, and now those dependencies live in the image until something changes and I need to pull in more images.
But when deploying or moving to a new environment, don't I need to build the image or the container again? Meaning, isn't it going to run 'npm install' again anyway?
I want to understand what is meant exactly by build once, run anywhere.
Thank you in advance.