How add cron in docker with supervisord.
If your want add cron in docker with supervisord(in this example docker php-alpine) i can help you.
In this example we add cron run every one minute for run script /etc/periodic/everyminute/schedule. This script we create with cat command.
cat <<OEF> /etc/supervisor.d/cron.ini
[supervisord]
nodaemon=true
[program:crond]
command=/usr/sbin/crond -f -l 0 -d 0
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
startretries=40
user=
OEF
if [[ ! -d "/etc/periodic/everyminute" ]];then
mkdir -p /etc/periodic/everyminute
fi
echo "* * * * * run-parts /etc/periodic/everyminute" >> /var/spool/cron/crontabs/root
cat <<OEF> /etc/periodic/everyminute/schedule
#!/bin/bash
cd /var/www/html/laravel/current && /usr/local/bin/php artisan schedule:run
OEF
if [[ -f "/etc/periodic/everyminute/schedule" ]];then
chmod 0755 /etc/periodic/everyminute/schedule
fi