error Command failed with signal "SIGINT". when try to terminal the docker container

Viewed 2502

I have a simple node.js web app.

☁  node-app [master] yarn start                              
yarn run v1.17.3
$ node ./dist/main.js
Http server is listening on http://localhost:3000
^C

Start the web application in the localhost and use control-c terminal it. It works fine.

Now, I build a docker image for this node web application. Run the docker container and terminal it uses the same way control-c.

☁  node-app [master] docker run -it -p 3000:3000 node-app:1.0
yarn run v1.16.0
$ node ./dist/main.js
Http server is listening on http://localhost:3000
error Command failed with signal "SIGINT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The docker container is terminated as expected. But it seems yarn CLI throw an error for this.

Dockerfile:

# install dependencies ...
# build ...
CMD yarn start

How can I solve this?

0 Answers
Related