CentOS-based image that uses runit to
We use a custom init process (a bash script named /sbin/my_init) because using
runit directly proved to be problematic with Docker: it mishandles receiving a
SIGTERM signal as a result of a
docker stop, it doesn't support custom init
and shutdown scripts.
Each executable file (or symlink to such a file) is executed on startup;
files are read in lexicographic order. If a process exits with a nonzero
status, the rest of the files are skipped, and the shutdown sequence
Each directory in
/etc/service.dis a runit service: see http://smarden.org/runit/runsv.8.html
Each executable file (or symlink to such a file) is executed on shutdown;
files are read in lexicographic order. Unlike the files in
/etc/service-startup.d, the exit status is ignored.
Service logs live in
/var/log/svlogd/SERVICE_NAME. Logs produced by the
contents of /etc/service-startup.d or /etc/service.shutdown.d are logged in
/var/log/svlogd/startup and /var/log/svlogd/shutdown respectively.