Docker-node: Properly handle signals from kernel

Created on 2 Feb 2017  路  3Comments  路  Source: nodejs/docker-node

When running Node.js inside of a Docker container, the process doesn't properly handle signals from the kernel. This manifests itself as containers refusing to shutdown when issued SIGTERM (CTRL+C).

A pattern I've started using for Node containers is to wrap the executable in Yelp's dumb-init

Thoughts on either including this in the documentation or shipping this to the base image?

docs enhancement question

Most helpful comment

With docker 1.13 you can use --init on docker run to get tini automatically injected for you as PID 1. :smile:

All 3 comments

With docker 1.13 you can use --init on docker run to get tini automatically injected for you as PID 1. :smile:

I'm more in favour of having something in the documentation either about the docker 1.13 feature or other options

Woah, the --init flag is pretty amazing, didn't know this existed!

:+1: on this being documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marciomsm picture marciomsm  路  4Comments

polys picture polys  路  3Comments

sam-github picture sam-github  路  4Comments

mtibben picture mtibben  路  3Comments

tgalopin picture tgalopin  路  5Comments