Dockerfile is this part: https://github.com/docker-library/php/blob/f016f5dc420e7d360f7381eb014ac6697e247e11/7.0/fpm/ Alpine/dockerfile
Post-Build execution
sudo docker run-d-P 9000:9000--name php7-fpm Daocloud.io/xxx/php7-fpm-alpine:first
Daocloud.io/xxx/php7-fpm-alpine:first is a built-in mirror
Then sudo docker PS shows that the scene is already running
I have a local nginx reboot run
Turn off local PHP-FPM execute the above boot container command after accessing PHP file
No 502 errors were reported, but the error File was not found.
System is Mac, what's the problem?
I tried it on--------yes.
sudo docker run-d-P 9000:9000-v/usr/local/www:/var/www/html--name php7-fpm Daocloud.io/xxx/php7-fpm-alpine:first
/usr/local/www is my local nginx access directory
Reply content:
Dockerfile is this part: https://github.com/docker-library/php/blob/f016f5dc420e7d360f7381eb014ac6697e247e11/7.0/fpm/ Alpine/dockerfile
Post-Build execution
sudo docker run-d-P 9000:9000--name php7-fpm Daocloud.io/xxx/php7-fpm-alpine:first
Daocloud.io/xxx/php7-fpm-alpine:first is a built-in mirror
Then sudo docker PS shows that the scene is already running
I have a local nginx reboot run
Turn off local PHP-FPM execute the above boot container command after accessing PHP file
No 502 errors were reported, but the error File was not found.
System is Mac, what's the problem?
I tried it on--------yes.
sudo docker run-d-P 9000:9000-v/usr/local/www:/var/www/html--name php7-fpm Daocloud.io/xxx/php7-fpm-alpine:first
/usr/local/www is my local nginx access directory
Hello, the WWW directory will also be mapped into the PHP-FPM instance Oh. Because the FPM way, Nginx passed to PHP-FPM is just a request object Oh, does not contain PHP file OH.
So you're going to map the WWW directory to the PHP-FPM instance <和nginx实例一样的路径> , too.
Amount
Need to ensure: Nginx See the path and PHP-FPM see the same path. Because Nginx is to pass the path to PHP-FPM.
Have skipped the pit, out of the Pit method: Find your php-fpm.conf, look inside the configuration of the Error_log path, find this error_log, inside will see can not find. PHP error.