Giter Site home page Giter Site logo

behance / docker-php Goto Github PK

View Code? Open in Web Editor NEW
27.0 6.0 36.0 615 KB

Provides basis for Nginx/PHP-FPM web apps

Home Page: https://hub.docker.com/r/behance/docker-php/

License: MIT License

Shell 60.94% PHP 8.09% Roff 30.97%
php-fpm ubuntu nginx docker alpine s6 goss

docker-php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-php's Issues

PHP "StdOut" Logs are Actually Delivered to Host as StdErr

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):

  • Actual: {"log":"I want a Bad Boy Sandwich\n","stream":"stderr","time":"2020-11-19T06:18:08.672226893Z"}
  • Expected: {"log":"I want a Bad Boy Sandwich\n","stream":"stdout","time":"2020-11-19T06:18:08.672226893Z"}

Notes:

  • Observe baseline intended functionality in the repo file jimdelois/behance-docker-php-stdout-bug/public/index.php
  • Raw PHP stream explicitly set to php://stdout; Loggers (e.g., Monolog) in production applications typically use this stream
  • The unexpected outcome is that containers are sending "normal" PHP output to STDERR, which affects metrics in AWS, FluentD routing, Sumo queries, etc.

Support Empty Environment Variables

run.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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.