Skip to content

Conversation

@lucsky
Copy link
Contributor

@lucsky lucsky commented Feb 12, 2017

Fixes #557.

As specified in the Docker documentation, a process running as PID 1 inside a container is treated specially by Linux: it ignores any signal with the default action. So, the process will not terminate on SIGINT or SIGTERM unless it is coded to do so. which is the reason why a webpack-dev-server run from a Docker container cannot be stopped which forces Docker to kill it after the standard 10s timeout. Explicitely handling the SIGTERM and SIGINT signals fixes this and allow much faster graceful shutdowns.

@jsf-clabot
Copy link

jsf-clabot commented Feb 12, 2017

CLA assistant check
All committers have signed the CLA.

@bebraw
Copy link
Contributor

bebraw commented Feb 16, 2017

Good idea. 👍

@DawidJanczak
Copy link

Is there anything blocking this?

@bebraw
Copy link
Contributor

bebraw commented Mar 9, 2017

No blockers. Just waiting a merge by @SpaceK33z.

@jaridmargolin
Copy link

Is the server.close() here necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graceful way to stop server.js through CLI/Docker?

6 participants