https://gitlab.com/tozd/docker/dinit
Available as:
tozd/base
← tozd/dinit
ubuntu-trusty
: dinit 0.2.0ubuntu-xenial
: dinit 0.2.0ubuntu-bionic
: dinit 0.2.0ubuntu-focal
: dinit 0.2.0ubuntu-jammy
: dinit 0.2.0alpine-38
: dinit 0.2.0alpine-310
: dinit 0.2.0alpine-312
: dinit 0.2.0alpine-314
: dinit 0.2.0alpine-316
: dinit 0.2.0
An image using dinit for service supervision.
It includes also regex2json binary to make it
easier to transform non-JSON output to JSON. It has also runit
binaries installed (e.g., you can use svlogd
to store service's stdout into a log file
and rotate it).
It can serve as a good base image for other Docker images.
It sets Docker image entrypoint so dinit is run automatically.
By default dinit expects that all programs/services it manages output to their stdout
logging in JSON while stderr can be unstructured. dinit then multiplexes output from
all programs/services to container's stdout and stderr. dinit outputs own
errors to container's stderr, too. In Docker, by default, container's stdout and
stderr are retrievable using docker logs
.
In short, to create a service create /etc/service/<name>/run
script which at the end
exec
s into the service executable you want to run (and supervise to keep running).
There is also a read-only GitHub mirror available, if you need to fork the project there.