Docker and runsvdir
don't quite agree on what each signal means, causing
TONS of frustration when attempting to use runsvdir
as init under Docker.
runit-docker
is a plug'n'play adapter library which does signal translation
without the overhead and nuisance of running a nanny process.
- Pressing Ctrl-C does a clean shutdown.
docker stop
does a clean shutdown.
Under the hood, runit-docker
translates SIGTERM
and SIGINT
to SIGHUP
.
- Build with
make
, install withmake install
. - Add
CMD ["/usr/sbin/runit-docker"]
to yourDockerfile
. - Run
debian/rules clean build binary
to build a Debian package.
runit-docker was written by Kosma Moczek <[email protected]> during a single Scrum planning meeting. Damn meetings.