How to go from slow to fast docker build with example

In this post, we will see a docker build example of a node js API application starting from slow and ending up in a ~10x faster build (60 secs to 6 secs).