Closed
Description
We recently encountered an issue with this image where we wanted to run supervisord to run CRON and sshd on the same image.
High level description
The entire entrypoint script is dependent on apache2*
and php-fpm*
commands being called in the CMD directive in the Dockerfile. Given the nature of docker and it's default of extensibility, any command passed to CMD effectively causes the entrypoint to not execute, breaking the image as WordPress install files do not get copied over.
Possible fixes or suggestions
There are a couple of approaches
- Not change the entrypoint. But improve the documentation so this unusual behavior is clearer
- Modify the entrypoint so that it creates some kind of default if the first command in CMD doesn't start with apache2* or php-fpm* (for eg default to apache2
- Alternatively, you could split out the generic logic in the entrypoint script into another script. and have this new script called by separate entrypoints for both php-fpm and apache images. This would do away the need for that variable check at the top and also provide more flexibility in the future.