For a while, I've been strugling to get dillon's cron working properly in Docker container. The problem has been that when the ENTRYPOINT was anything else than in shell form, I got 'setpgid: Operation not permitted'.
So, this worked:
ENTRYPOINT /usr/sbin/crond -fNone of these seemed to work:
ENTRYPOINT ["/usr/sbin/crond", "-f"]Or
ENTRYPOINT ["./entrypoint.sh"]As both would give
CMD ["/usr/sbin/crond", "-f"]
setpgid: Operation not permittedBut using shell form has been enough, for now. Now as I finally needed to have entrypoint for doing some preparation work, something had to be done.
"su -c" to the rescue.
ENTRYPOINT ["./entrypoint.sh"]Seems to be working perfectly.
CMD ["su", "-c", "/usr/sbin/crond -f"]
see https://gist.github.com/x-yuri/09b67a6db0903dc3a562747d2c242031
VastaaPoista