Open RRoohhiitt opened 4 months ago
That looks like https://github.com/npm/cli/issues/6684#issuecomment-1932473284; so, the fix is to update npm
to at least 10.3.0
. I verified that npm start
failed to forward the signals (and node server.js
worked), but if I upgraded npm, then npm start
worked again.
Environment
Expected Behavior
docker stop command should trigger SIGTERM signal
Current Behavior
For node:18.16.1-alpine3.18 and below the SIGTERM is received. But all above versions [I tried node:20.11.0-alpine3.18] its not received. Used command with init.
Steps to Reproduce
For both the version follow below steps
1) Nodejs
2) Dockerfile
3) Use below command to run
4) docker stop
Additional Information
Steps and commands followed along with its output
NODE VERSION 18.16.1
NODE VERSION 20
Please see points 3 and 4 for both the outputs above. For v20 it does not log the signal and gets forcefully shutdown with exit code 137 For v18 it logs the signal and the application closes with the expected exit code.