I am trying to run a cronjob inside a docker container that invokes a shell script.
Yesterday I have been searching all over the web and stack overflow, but I could
The most robust way I found so far is run an independent cron container - install the docker client and bind mount the docker sock so you can talk to the docker server on the host.
Then just use env vars for each cron job and an entrypoint script to generate the /etc/crontab
Here is an image that I created using this principle and using it in production for the last 3-4 years.
https://www.vip-consult.solutions/post/better-docker-cron#content