Skip to content

Instantly share code, notes, and snippets.

@xiaopeng163
Created June 13, 2022 12:31
Show Gist options
  • Save xiaopeng163/c75f385a381efbc0c56a46202a7a63f2 to your computer and use it in GitHub Desktop.
Save xiaopeng163/c75f385a381efbc0c56a46202a7a63f2 to your computer and use it in GitHub Desktop.
FROM alpine:latest
RUN apk update
RUN apk --no-cache add curl
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=048b95b48b708983effb2e5c935a1ef8483d9e3e
RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
COPY my-cron /app/my-cron
# RUN cron job
CMD ["/usr/local/bin/supercronic", "/app/my-cron"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment