When we were trying to create a docker image for our Node JS based application, we chose to use the official Node docker image (~700MB). On top of that we need to add the node modules, business logic, etc and so on. The final image size was staggering (~1.2GB). It was not what we wanted. Secondly, the average build time to do NPM install and run a grunt task totally took 15 minutes for every build. I am not even talking about the pain of configuring this for different CI/CD pipelines and environments.
The initial docker file was looking something like this:
Initial Docker File