using tini, functions for most code in entrypoint

This commit is contained in:
Omar Ahmad
2019-09-03 13:15:31 -04:00
parent 4a0d85f51a
commit 4f9146b8f8
2 changed files with 29 additions and 23 deletions

View File

@ -1,12 +1,12 @@
FROM library/docker:stable
ENV HOME_DIR=/opt/crontab
RUN apk add --no-cache --virtual .run-deps gettext bash py3-toml py3-yaml python3 jq \
RUN apk add --no-cache --virtual .run-deps gettext bash py3-toml py3-yaml python3 jq tini \
&& mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects \
&& adduser -S docker -D
COPY docker-entrypoint /
ENTRYPOINT ["/docker-entrypoint"]
ENTRYPOINT ["/sbin/tini", "--", "/docker-entrypoint"]
HEALTHCHECK --interval=5s --timeout=3s \
CMD ps aux | grep '[c]rond' || exit 1