Open cristi8 opened 3 months ago
Found a workaround that still works for k8s / ECS:
# HOSTNAME variable is set like this to ensure it's not overwritten by k8s / ECS when running the container
CMD ["/bin/sh", "-c", "exec env HOSTNAME=0.0.0.0 node server.js"]
by using exec, the node
process becomes PID 1 and handles signals correctly
Verify canary release
Provide environment information
Which example does this report relate to?
with-docker
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
The docker container ignores all signals.
I also found the problem. Things got broken by #59756 where the main process in the docker container was replaced with a bash shell, handling the env variable. If i use the original
things work as expected.
My guess is the fix is not that easy, as it might reopen #58657
IMHO, the
HOSTNAME
env variable name choice was not that good for specifying the network interface where it binds. And it might be a good time to change it to something more suitable now, since from what i understood, it was recently introduced and not documented anywayExpected Behavior
Current behavior: it ignores Ctrl+C Expected: It finishes the current connections and gracefully closes
To Reproduce
Use the example Dockerfile, create a container, run it with
-it
, then press Ctrl+C