From 8b83c9d9c6b3f5d1ef85a239cc8a6ed8b09dbae3 Mon Sep 17 00:00:00 2001 From: Selwyn Date: Thu, 19 Oct 2017 17:07:58 +0200 Subject: [PATCH] Add exit signal handling benefit to CMD section (#551) --- docs/BestPractices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/BestPractices.md b/docs/BestPractices.md index 1bef891e..7c53f3f6 100644 --- a/docs/BestPractices.md +++ b/docs/BestPractices.md @@ -95,7 +95,7 @@ By default, any Docker Container may consume as much of the hardware such as CPU ## CMD -When creating an image, you can bypass the `package.json`'s `start` command and bake it directly into the image itself. This reduces the number of processes running inside of your container. +When creating an image, you can bypass the `package.json`'s `start` command and bake it directly into the image itself. First off this reduces the number of processes running inside of your container. Secondly it causes exit signals such as `SIGTERM` and `SIGINT` to be received by the Node.js process instead of npm swallowing them. ```Dockerfile CMD ["node","index.js"]