wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

How to run the CROND mode? #26

Closed aledelgo closed 6 years ago

aledelgo commented 6 years ago

I've added the CRONTAB env var in my docker-compose file but nothing happens (/etc/crontabs/www-data file is empty ).

i tried to clone the php service with the crontab env var and set

command: 
     - "sudo"
     - "-E"
     - "crond"

to pass this cmd arguments to the entrypoint script because i can read this: https://github.com/wodby/php/blob/8b14714c4e94f928c2dcfa3b89052a706366aaf1/7/docker-entrypoint.sh#L91

but in this case the service start and stop immediately without errors.

any hint?

csandanov commented 6 years ago

See how we run crond in tests: https://github.com/wodby/php/blob/master/7/test/docker-compose.yml#L81