moodlehq / moodle-php-apache

PHP + Apache docker images for Moodle development
61 stars 68 forks source link

Various helpers are polluting stdout, making the output of php scripts to become borked #177

Open stronk7 opened 1 year ago

stronk7 commented 1 year ago

Along the last months we have added a bunch of nice extras to the images (support for entrypoints, php.ini settings and extensions enable and disabling.

But there is a problem, because all them are sending to stdout information. Say:

Checking for php configuration in environment
Running PHP Configuration fetcher
Running entrypoint files from /docker-entrypoint.d
Found extension to enable:
...

And that makes simple execution of PHP scripts to become borked, for example:

$ docker run -it --rm moodlehq/moodle-php-apache:8.1-buster php -r 'echo PHP_VERSION;'
Running PHP Configuration fetcher
Checking for php configuration in environment

Running entrypoint files from /docker-entrypoint.d/*

Starting docker-php-entrypoint with php -r echo PHP_VERSION;
8.1.20

All that information shouldn't go to stdout (maybe stderr?) or, at very least, there should be an option to make all the initialisation quiet. Goal, to get exclusively the php execution results at stdout.

Ciao :-)