Skip to content

Teardown command? #472

@FezVrasta

Description

@FezVrasta

I'm trying to run a docker container along with a node.js server, and I would like to stop the container when the user stops the node.js server script.

"dev": "concurrently 'node server.js' 'docker start -i database'"

Unfortunately Docker doesn't properly shuts down the container when CTRL+C is pressed, even though it does it when I run the docker command directly.

Would it be possible to add a --teardown option that allows to specify a script to run when the process is interrupted (CTRL+C is pressed)?

"dev": "concurrently --teardown 'docker kill database' 'node server.js' 'docker start -i database'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions