Fix killing of unresponsive containers by adding init process
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Created by: mrnugget
Fixes https://github.com/sourcegraph/sourcegraph/issues/15314
This adds the --init
flag to the docker run
command so that the
entrypoint process (bash
in our case) is started by a init process.
That fixes the behaviour of the interrupt signal simply having no
effect.
From what I could gather that's because PID 1 (which is the
--entrypoint
in a Docker container) is protected and cannot be killed.
But --init
is given the PID1 is an init process, which forwards the
signal to our entrypoint and kills it, exiting afterwards.
Resources:
Push commits to the source branch or add previously merged commits to review them.