An Ubuntu 14.04 based image, featuring s6 process management.
1.6K
A base image for running just about anything within a container, based on Ubuntu 14.04.
This image includes s6 (built statically), to make it super simple to start multiple process and manage them correctly.
Aren't you only supposed to run one process per container? Well yes and no... the following are good examples of when multiple processes within one container might be necessary:
To use this image include FROM smebberson/ubuntu-base at the top of your Dockerfile. Inheriting from smebberson/ubuntu-base provides you with the ability to easily start any service using s6. s6 will also keep it running for you, restarting it when it crashes.
To start your service using s6:
/etc/s6/service_namerun and give it execute permissions#!/usr/bin/env bash
# start nginx
exec nginx;
If you want to run a script when your application stops, simply:
/etc/s6/service_name folder called finish and give it execute permissionsIn this file, do whatever you need to, but keep it quick and simple (anything over 3 seconds and s6 will force quit it). Once this script has run, s6 will call /etc/s6/service_name/run again to restart your service.
s6 has a number of other options that you can use to gain more information about your process and what's happening to them.
An example of using this image can be found in the smebberson/nodejs Dockerfile.
Content type
Image
Digest
sha256:e437301f7…
Size
117.7 MB
Last updated
over 11 years ago
docker pull smebberson/ubuntu-base