simple container to run cron jobs
docker run -v "/path/to/cron:/etc/cron.d/crontab" gaafar/cron
/path/to/cron: absolute path to crontab file
FROM gaafar/cron
# COPY crontab file in the cron directory
COPY crontab /etc/cron.d/crontab
# Add your commands here
* * * * * root echo "hello" >> /var/log/cron.log 2>&1
# An empty line is required at the end a cron file.
docker cron environment for some workarounds.Content type
Image
Digest
Size
75.4 MB
Last updated
almost 10 years ago
docker pull gaafar/cron