-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathDockerfile
26 lines (18 loc) · 776 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
FROM library/docker:stable
COPY --from=rq-build /root/rq /usr/local/bin
ENV HOME_DIR=/opt/crontab
RUN apk add --no-cache --virtual .run-deps gettext jq bash tini \
&& mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects \
&& adduser -S docker -D
COPY docker-entrypoint /
ENTRYPOINT ["/sbin/tini", "--", "/docker-entrypoint"]
HEALTHCHECK --interval=5s --timeout=3s \
CMD ps aux | grep '[c]rond' || exit 1
CMD ["crond", "-f", "-d", "6", "-c", "/etc/crontabs"]