You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that all the output on bootstrap goes to stderr
That way we can filter out it if needed, for example if we just
want to instantiate a php container to run a php script, we don't
want all the bootstrap (entrypoint, ini config...) information
to pollute the execution. That way, this will work as expected:
```
$ docker run --rm moodlehq/moodle-php-apache php -r 'echo "Hi!" . PHP_EOL;' 2>/dev/null
Hi!
```
And, without discarding stderr, we still get all the information (stdout + stderr):
```
$ docker run --rm moodlehq/moodle-php-apache php -r 'echo "Hi!" . PHP_EOL;'
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 "Hi!" . PHP_EOL;
Hi!
```
The only alternative to the above that I can imagine is to completely suppress
any output (to both stdout and stderr) in out bootstrap.
Note that I've also tried to send the information to Apache error log,
but that was futile, because the images have error.log as alias of stderr.
0 commit comments