Getting cron to run on php:7-fpm image : <p>I'm pretty new to docker. I've set up a dockerfile using the php:7-fpm image. As well as this image being used to run my site, I want to add a cron to be able to perform regular tasks.</p>

<p>I've created a cron, put it in the correct folder, and running <code>docker exec -ti myimage_php_1 /bin/bash</code> then <code>cron</code> or if I <code>tail</code> the log file all works fine. But I can't get this to work when the container is created, I don't want to have to manually start the cron obviously.</p>

<p>From what I understand, I need to use <code>CMD</code> or <code>ENTRYPOINT</code> to run the <code>cron</code> command on startup, but every time I do this it stops my site working due to me overriding the necessary <code>CMD/ENTRYPOINT</code> functionality of the original php:7-fpm image. Is there a way to trigger both the cron command and continue as before with the php:7-fpm <code>CMD/ENTRYPOINT</code>s?</p>
