Public | Automated Build

Last pushed: 2 years ago
Short Description
CentOS-based image that uses runit to supervise processes.
Full Description

docker-centos-base

CentOS-based image that uses runit to
supervise processes.

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.

Service Diretories

  • /etc/service-startup.d
    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
    begins.

  • /etc/service.d
    Each directory in /etc/service.d is a runit service: see http://smarden.org/runit/runsv.8.html

  • /etc/service-shutdown.d
    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.

Log directories

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.

Docker Pull Command
Owner
nickhutchinson
Source Repository