HUB
Sign inSign up

ponycool/php-fpm-7.4

By ponycool

•Updated over 5 years ago

PHP-FPM 7.4 Docker 镜像

Image
0

291

ponycool/php-fpm-7.4 repository overview

⁠PHP-FPM 7.4 Docker 镜像

⁠说明
  • WEB_ROOT根目录 /var/www/html
  • PHP_INI_DIR /usr/local/etc/php
  • CONF_DIR /usr/local/etc/php-fpm.d

FPM镜像需配合NGINX使用,NGINX配置参考以下配置

server {
    listen       8001;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        root   /var/www/html;
        index  index.html index.htm index.php;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /var/www/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
        #proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           /var/www/html;
        fastcgi_pass   php-fpm:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny  all;
    }
}
⁠运行
docker run -d \
--name php \
-p 80:9000 \
ponycool/php-fpm-7.4:latest
⁠构建
./build.sh

或者

make docker

Blog: https://www.mayanpeng.cn⁠

Email: pony#ponycool.com(将#替换为@)

Git: https://github.com/PonyCool⁠

DockerHub:https://hub.docker.com/u/ponycool⁠

Tag summary
Recent tags
Content type
Image
Digest
Size
97.3 MB
Last updated
over 5 years ago
docker pull ponycool/php-fpm-7.4:latest