behance / docker-php Goto Github PK
View Code? Open in Web Editor NEWProvides basis for Nginx/PHP-FPM web apps
Home Page: https://hub.docker.com/r/behance/docker-php/
License: MIT License
Provides basis for Nginx/PHP-FPM web apps
Home Page: https://hub.docker.com/r/behance/docker-php/
License: MIT License
Summary: When using behance/docker-php:7.4
, any logging or stream writing within a PHP application that is configured for stdout
(e.g., php://stdout
) actually arrives at the docker host on stderr
.
To reproduce:
git clone [email protected]:jimdelois/behance-docker-php-stdout-bug
cd behance-docker-php-stdout-bug
docker-compose up -d
Enter the Docker Machine Name for your local
DOCKER_MACHINE_NAME=""
Send a request to the container:
curl -XGET http://$(docker-machine ip $DOCKER_MACHINE_NAME):$(docker port badboy 8080 | awk '{split($0,a,":"); print a[2]}')
Examine the Docker logging by examining the raw container logs from the docker host
(e.g., docker-machine ssh $DOCKER_MACHINE_NAME
, thence tail -F /var/lib/docker/containers/$CONTAINER_ID/$CONTAINER_ID-json.log
):
{"log":"I want a Bad Boy Sandwich\n","stream":"stderr","time":"2020-11-19T06:18:08.672226893Z"}
{"log":"I want a Bad Boy Sandwich\n","stream":"stdout","time":"2020-11-19T06:18:08.672226893Z"}
Notes:
jimdelois/behance-docker-php-stdout-bug/public/index.php
php://stdout
; Loggers (e.g., Monolog) in production applications typically use this streamrun.sh fails when environment variables are set to empty strings
[21-Jul-2015 15:24:52] ERROR: [/etc/php5/fpm/pool.d/www.conf:414] empty value
[21-Jul-2015 15:24:52] ERROR: Unable to include /etc/php5/fpm/pool.d/www.conf from /etc/php5/fpm/php-fpm.conf at line 414
[21-Jul-2015 15:24:52] ERROR: failed to load configuration file '/etc/php5/fpm/php-fpm.conf'
[21-Jul-2015 15:24:52] ERROR: FPM initialization failed
The default shm_size
value is "32M" which is on the small side. It would be nice to override this with an environment variable. Documentation for shm_size
can be found here https://www.php.net/manual/en/apc.configuration.php#ini.apc.shm-size
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.