Skip to content

Instantly share code, notes, and snippets.

View bloodearnest's full-sized avatar

Simon Davy bloodearnest

  • Bennett Institute for Appllied Data Science, Oxford University
  • Leeds, UK
  • X @bloodearnest
View GitHub Profile
@bloodearnest
bloodearnest / Dockerfile
Created February 11, 2025 11:59
Simple multiprocess dockerfile
# Sometimes, you want to run a simple background process, as well as your main process, e.g. webserver.
# You can run multiple instances of your container, or you can use s6 or other supervisor tool
#
# Or, you can use a couple of simple tools
FROM ubuntu:22.04
RUN apt update && apt install run-one # for run-one-constantly
# set up your app here
# tell tini to kill the whole process group, not just the one process
ENV TINI_KILL_PROCESS_GROUP=1
COPY entrypoint.sh /entrypoint.sh