2020-12-21 19:19:52 -05:00
|
|
|
FROM alpine:3.12 as rq-build
|
|
|
|
|
|
|
|
ENV RQ_VERSION=1.0.2
|
|
|
|
WORKDIR /root/
|
|
|
|
|
|
|
|
RUN apk --update add upx \
|
|
|
|
&& wget https://github.com/dflemstr/rq/releases/download/v${RQ_VERSION}/rq-v${RQ_VERSION}-x86_64-unknown-linux-musl.tar.gz \
|
|
|
|
&& tar -xvf rq-v1.0.2-x86_64-unknown-linux-musl.tar.gz \
|
|
|
|
&& upx --brute rq
|
|
|
|
|
2017-04-07 23:25:53 -06:00
|
|
|
FROM library/docker:stable
|
2017-02-12 16:28:53 -07:00
|
|
|
|
2020-12-21 19:19:52 -05:00
|
|
|
COPY --from=rq-build /root/rq /usr/local/bin
|
|
|
|
|
2017-02-12 16:28:53 -07:00
|
|
|
ENV HOME_DIR=/opt/crontab
|
2020-12-21 19:19:52 -05:00
|
|
|
RUN apk add --no-cache --virtual .run-deps gettext jq bash tini \
|
2017-11-14 14:04:30 -07:00
|
|
|
&& mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects \
|
2018-06-30 15:23:27 -06:00
|
|
|
&& adduser -S docker -D
|
2017-02-12 16:28:53 -07:00
|
|
|
|
|
|
|
COPY docker-entrypoint /
|
2019-09-03 13:15:31 -04:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--", "/docker-entrypoint"]
|
2017-02-12 16:28:53 -07:00
|
|
|
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s \
|
|
|
|
CMD ps aux | grep '[c]rond' || exit 1
|
|
|
|
|
2019-03-02 15:45:19 +03:00
|
|
|
CMD ["crond", "-f", "-d", "6", "-c", "/etc/crontabs"]
|