A minimalist init process designed for Docker

View on GitHub


Build Status

A simple Unix utility in C to run multiple commands concurrently.

Usage: multirun "command1" "command2" ...

You can also add the -v option to get a full log of the processes it starts and kills.

Unlink most process managers multirun never attempts to restart one of its children if it crashes. Instead it will kill all its other children before exiting with an error code. This behavior is ideal when you just want to delegate the restart duty to the upper level, as example using systemd or Docker restart policies.



Package manager

apk add multirun

Binary install

wget && \
tar -zxvf multirun-musl-1.0.0.tar.gz && \
mv multirun /bin && \
rm multirun-musl-1.0.0.tar.gz

Ubuntu, Debian, Red Hat, Centos…

Binary install

wget && \
tar -zxvf multirun-glibc-1.0.0.tar.gz && \
mv multirun /bin && \
rm multirun-glibc-1.0.0.tar.gz

From sources

git clone --branch 1.0.0 && \
cd multirun && \
cmake . && \
cmake --build . && \
cp multirun /bin && \
cd .. && \
rm -rf multirun


When to use multirun in a Docker container

The Docker documentation and most best practices documents regarding Docker tells that you should embed no more than one application per container. This is indeed perfectly true.

One container is meant to contain one application. If you want to deploy multiple applications at once (like a web server and a database) you should arrange your containers to properly communicate with the external world using network and volumes, make them easily configurable though environment variables and pack everything in a docker-compose or similar tool configuration. That is the correct way to do the job 95% of the time. It will allow you to keep each application separate from each other, to isolate their respective environments, to manage their lifecycle separately, to identify clearly which volume is dedicated to what, to scale all applications independently, etc…

Then there is the remaining 5% where it’s hard to define precisely what an application is. An application is not just a single process (countless web servers and databases spawn multiple processes for performance reason) nor a number of processes doing the same thing (again, a lot of applications spawn different processes with different purposes). Multirun, or any process manager in general, should be considered in a Docker container only for those specific cases where you consider that a single application necessitate multiple processes to fulfill its single purpose.

Here are some good use cases where multirun can be useful:

Here is an example of bad use case:


See the contribution guide.


See the license.