VRT Systems Docker base image
VRT Systems common docker base image for deriving other VRT docker images.
Derived from the official Docker Debian Jessie, with:
openssh-clientfor pulling in remote content inside containers built on this one.
- pre-loaded SSH host identities for github and bitbucket to allow non- interactive code pulls.
gosufor easy user switching in docker.
supervisordto provide proper process supervision (restart on fail, and reap zombies) and log redirection (via stdout, the Docker way).
en_AUlocale by default.
VOLUME ["/var/local"]to provide a common data storage location to simplify volume linking.
- a /usr/local/sbin/docker-cleanup.sh script to conveniently clean up layered container builds in a constent way.
How to use this image
Derive your docker image from this one (hosted at docker registry as vrtsystems/baseimage):
Then copy in a supervisord.conf file and start supervisord via ENTRYPOINT and/or CMD:
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf CMD ["/usr/bin/supervisord"]
A sample supervisord.conf:
[supervisord] logfile=/dev/null pidfile=/var/run/supervisord.pid nodaemon=true [program:postgres] command=/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/data user=postgres redirect_stderr=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 auto_start=true autorestart=true
Note that setting stdout and stderr as shown above ensures that log output from supervisord child processes are passed to stdout so that "docker logs" works as it should.