However, when it runs I see the message “crond: can’t set groups: Operation not permitted” and the command (just a simple echo statement) does not execute.
When i run the container as the root user (with docker’s -u flag specifying to run as “root”), it runs just fine, echos the output, etc…,
Any ideas on why that may be the case or what I can do to run crond as a non-root user successfully?
From strace logs the error " can’t set groups: Operation not permitted" was thrown by syscall setgroups, called by crond.c, as the CAP_SETGID needed by setgroups commonly crond NOT be running.
I just coded the fix, and the patched alpine: geekidea/alpine-cron, and more details