I'd suggest to avoid npm run in the CMD line. NPM does not pass OS signals like SIGTERM to the Node application. It could cause a data loss for example. Explanation with sample source code in my blog post
adambrodziak.pl/dockerfile-good-practices-for-nod…
Adam Brodziak
SRE / DevOps exploring Kubernetes, Docker, Cloud, AWS.
I'd suggest to avoid
npm runin the CMD line. NPM does not pass OS signals like SIGTERM to the Node application. It could cause a data loss for example. Explanation with sample source code in my blog post adambrodziak.pl/dockerfile-good-practices-for-nod…