How to stop running node in docker

后端 未结 8 1979
广开言路
广开言路 2021-02-13 18:02

I have just installed dockers and installed node. I am able to run a basic express site. My issue now is I can\'t stop it. Control-C is not doing anything.

Temporarily w

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-13 18:30

    As described here: github: docker-node best practice

    You can add the --init flag to your docker run command.

    docker run -it --init -p 3000:3000 --name nodetest mynodeimage
    

提交回复
热议问题