I have built a container from a Dockerfile, based on an Archlinux base image. Using a "RUN" command I have installed "cronie", since Arch does not come with any form of cron. Now, after the container is built, I run it and attach to it. I start manually the cron daemon, verify that it is indeed running with "ps -aux" and make the required cronjobs with "crontab -e". The thing is, no cronjobs are run...
Any ideas?
You can use the package fcron, and run the cron process in foreground mode:
To troubleshoot Cron it may be handy to run syslog in Docker container.
As described here Cron may refuse to interpret its hard-linked configuration files which is a typical situation on Docker's layered overlay(fs) file system. If Cron logs something like
NUMBER OF HARD LINKS > 1 (/etc/crontab)
to syslog it may help to use the following command in container's entry script: