Skip to content

Argument check in docker-entrypoint.sh #805

Open
@saenglert

Description

@saenglert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions