This is a Docker base image built on top of the Griffin+ base image. In addition to the Griffin+ Container Startup System shipped with the base image, this image comes with supervisord to run custom services added in derived images. For more information about the startup system, please see the documentation of the Griffin+ base image.
The image is quite simple to use, since it is automatically built and updated by our build pipeline. A fresh image can
be pulled from the Docker Hub. Just add the following line at
the beginning of your Dockerfile
:
FROM griffinplus/base-supervisor
To let supervisord start a custom service, you only need to place a service configuration file (*.conf) for supervisord
in /etc/supervisor/conf.d/
. The service must have the following characteristics:
- The service must run in foreground mode.
- The process should honor the TERM signal and shut down gracefully (the signal can be overridden using the
stopsignal
setting, see documentation).
The following simple example will spawn NGINX.
# /etc/supervisor/conf.d/nginx.conf
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
See the documentation of supervisord for details on how to adjust supervisord settings according to your needs.