You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified that the issue exists in the latest Next.js canary release
Provide environment information
n/a
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
ENV HOSTNAME "0.0.0.0"
CMD ["node", "server.js"]
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 anyway
Expected 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
The text was updated successfully, but these errors were encountered:
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+CThe text was updated successfully, but these errors were encountered: