diff --git a/index.html b/index.html
index 0b23d85..6d01e18 100644
--- a/index.html
+++ b/index.html
@@ -107,6 +107,8 @@
+ Tweet
+
@@ -270,6 +272,25 @@ CMD ["/sbin/my_init"]
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
You can add additional daemons (e.g. your own app) to the image by creating runit entries. You only have to write a small shell script which runs your daemon, and runit will keep it up and running for you, restarting it when it crashes, etc.
+ +The shell script must be called run, must be executable, and is to be placed in the directory /etc/service/<NAME>.
Here's an example showing you how to a memached server runit entry can be made.
+ +### In memcached.sh (make sure this file is chmod +x): +#!/bin/sh +# `chpst` is part of running. `chpst -u memcache` runs the given command +# as the user `memcache`. If you omit this, the command will be run as root. +exec chpst -u memcache /usr/bin/memcached >>/var/log/memcached.log 2>&1 + +### In Dockerfile: +RUN mkdir /etc/service/memcached +ADD memcached.sh /etc/service/memcached/run+ +
Note that the shell script must run the daemon without letting it daemonize/fork it. Usually, daemons provide a command line flag or a config file option for that.
+This website only covers the basics. Please refer to the Github repository for more documentation. Topics include:
Having problems? Want to participate in development? Please post a message at the discussion forum.
+ +