We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pressing ctrl-c when running a simple nodejs script should emit a sigint and stop node.
Pressing ctrl-c is ignored
Create in a empty dir the following files:
Dockerfile:
FROM node:20.3-alpine3.18 COPY . . RUN npm install CMD [ "npm", "start" ]
package.json
{ "name": "test", "version": "1.0.0", "main": "test.js", "scripts": { "start": "node test.js" } }
test.js
'use strict'; console.log("test"); for (let i=0; i<10; i++) { task(i); } function task(i) { setTimeout(function() { console.log(i); }, 2000 * i); }
build a docker image with docker build -t test .
docker build -t test .
run the image with docker run test
docker run test
press ctrl-c to abort, nothing happens
Works on node:20.2-Alpine3.18
The text was updated successfully, but these errors were encountered:
See https://github.com/nodejs/docker-node/blob/7f99010af378daa2520bb60435d0e91e20950d82/docs/BestPractices.md#handling-kernel-signals 👀
Sorry, something went wrong.
No branches or pull requests
Environment
Expected Behavior
Pressing ctrl-c when running a simple nodejs script should emit a sigint and stop node.
Current Behavior
Pressing ctrl-c is ignored
Steps to Reproduce
Create in a empty dir the following files:
Dockerfile:
package.json
test.js
build a docker image with
docker build -t test .
run the image with
docker run test
press ctrl-c to abort, nothing happens
Additional Information
Works on node:20.2-Alpine3.18
The text was updated successfully, but these errors were encountered: