Skip to content

Instantly share code, notes, and snippets.

@allanlei allanlei/Dockerfile
Last active Jan 7, 2019

Embed
What would you like to do?
Running cron in Docker via compiled image
FROM alpine
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# run: docker run -it --rm IMAGE "* * * * * echo hello"
#!/bin/sh
set -e
echo "$1" | crontab - && crond -f -L /dev/stdout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.