https://gitlab.com/tozd/docker/nginx-cron
Available as:
tozd/base ← tozd/dinit ← tozd/nginx ← tozd/nginx-mailer ← tozd/nginx-cron
See also tozd/cron.
ubuntu-trusty: cron 3.0pl1ubuntu-xenial: cron 3.0pl1ubuntu-bionic: cron 3.0pl1ubuntu-focal: cron 3.0pl1ubuntu-jammy: cron 3.0pl1ubuntu-noble: cron 3.0pl1ubuntu-resolute: cron 3.0pl1
MAILTO: An e-mail address to which output from cron jobs is sent.
Image extending tozd/nginx-mailer image to add support for cron jobs.
A suggested way to use this image is to extend it, add a program you want
to use in a cron job, and add a crontab file to /etc/cron.d directory
(or other cron crontab directories, like /etc/cron.daily).
You should set MAILTO environment variable to an e-mail address to which output from cron jobs should be sent.
For e-mailing out of the container the image uses nullmailer.
For it to work, you should set ADMINADDR environment variable to an e-mail address to which errors and failures should
go, and REMOTES to the e-mail relay server this image should be using to send e-mails.
When cron daemon runs, it stores its environment into /dev/shm/cron-environment file.
Your cron scripts can then source this file (. /dev/shm/cron-environment) to gain access
to environment variables provided to Docker container. Only root processes can access this file.
The image runs logrotate daily as a cron job. Log files in /var/log/nginx
are rotated daily and kept for 14 days, after which nginx is signaled to reopen its log files. When LOG_TO_STDOUT
is set to 1, there are no log files to rotate. Images extending this image can add their own logrotate configuration
files to /etc/logrotate.d directory.
There is also a read-only GitHub mirror available, if you need to fork the project there.