docker-crontab/Dockerfile
Sergey Shambir e3afe6c3e5 Fix crond command in Dockerfile
- added logging to docker logs
- run with /etc/crontabs dir
See also https://unix.stackexchange.com/questions/412805/crond-log-level-meaning
2019-03-02 16:02:52 +03:00

15 lines
390 B
Docker

FROM library/docker:stable
ENV HOME_DIR=/opt/crontab
RUN apk add --no-cache --virtual .run-deps bash jq \
&& mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects \
&& adduser -S docker -D
COPY docker-entrypoint /
ENTRYPOINT ["/docker-entrypoint"]
HEALTHCHECK --interval=5s --timeout=3s \
CMD ps aux | grep '[c]rond' || exit 1
CMD ["crond", "-f", "-d", "0", "-c", "/etc/crontabs"]