-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
4 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
echo "Hello World!"; |