Echo JS 0.11.0

<~>
qubyte 2426 days ago. link 2 points
This article has some problems. For example, you do not need to add a new user. The node image provides a user called "node" for you:

https://github.com/nodejs/docker-node/blob/b3ca6573b5c179148b446107386ae96ac6204ad3/8/Dockerfile#L3

Another issue is SIGTERM handling. Your node app needs to listen for SIGTERM events from the process object, and perform a graceful shutdown when it receives one. Without this Docker or Kubernetes will wait for some time (the app won't understand SIGTERM without explicit handling) and then kill the container with no grace at all.

Replies