Description
Hello everyone,
I wondered what the reasoning behind the argument check in the docker-entrypoint script for the apache and fpm images is:
...
if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then
...
As far as I can tell, all images use either apache2-foreground
or php-fpm
as command, so the check seems redundant.
I stumbled upon this as I was trying to run a script between the entry point and the command. When using this solution, the image's own entry point script of course skips the if-clause. After digging a bit more, I found an issue where people get around this by renaming their scripts.
So to me it seems the check should be either removed or replaced with a search for apache2
or php-fpm
within all arguments, so people can more easily add custom scripts.
That is, of course, if there is no special reasoning behind this check.