浏览代码

Debian 12 php-8.2 Update

hongwenjun 1 年之前
父节点
当前提交
0f268cb8fe
共有 3 个文件被更改,包括 12 次插入7 次删除
  1. 7 3
      Dockerfile
  2. 3 3
      README.md
  3. 2 1
      default

+ 7 - 3
Dockerfile

@@ -1,8 +1,8 @@
 FROM debian:stable-slim
 FROM debian:stable-slim
 RUN  apt update -y && \
 RUN  apt update -y && \
      apt install -y --no-install-recommends --no-install-suggests nginx supervisor wget  \
      apt install -y --no-install-recommends --no-install-suggests nginx supervisor wget  \
-     php7.4 php7.4-fpm php7.4-sqlite3 php7.4-xml php7.4-zip php7.4-pgsql php7.4-mbstring  \
-     php7.4-bcmath php7.4-json php7.4-mysql php7.4-gd php7.4-cli php7.4-curl php7.4-cgi && \
+     php8.2 php8.2-fpm php8.2-sqlite3 php8.2-xml php8.2-zip php8.2-pgsql php8.2-mbstring  \
+     php8.2-bcmath php8.2-mysql php8.2-gd php8.2-cli php8.2-curl php8.2-cgi && \
      mkdir -p  /var/run/php  /run/php  /etc/nginx/cert && \
      mkdir -p  /var/run/php  /run/php  /etc/nginx/cert && \
      wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/start.sh         --no-check-certificate && \
      wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/start.sh         --no-check-certificate && \
      wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/default          --no-check-certificate  && \
      wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/default          --no-check-certificate  && \
@@ -14,7 +14,11 @@ RUN  apt update -y && \
      ln -sf /dev/stderr /var/log/nginx/error.log   && \
      ln -sf /dev/stderr /var/log/nginx/error.log   && \
      echo "<?php phpinfo(); ?>"  > /var/www/html/index.php && \
      echo "<?php phpinfo(); ?>"  > /var/www/html/index.php && \
      apt remove -y wget && \
      apt remove -y wget && \
-     rm -rf /var/lib/apt/lists/*   /var/cache/apt
+     rm -rf /var/lib/apt/lists/*   /var/cache/apt  && \
+     cd /etc/php/8.2/fpm  && \
+     sed -i 's/post_max_size = 8M/post_max_size = 80M/g'  php.ini && \
+     sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 80M/g'  php.ini
+
 
 
 EXPOSE 80/tcp  443/tcp
 EXPOSE 80/tcp  443/tcp
 # VOLUME [ /var/www/html  /etc/nginx/conf.d  /etc/nginx/cert ]
 # VOLUME [ /var/www/html  /etc/nginx/conf.d  /etc/nginx/cert ]

+ 3 - 3
README.md

@@ -4,7 +4,7 @@
 # tag 20210703  linux/arm,linux/arm64,linux/amd64 多平台支持
 # tag 20210703  linux/arm,linux/arm64,linux/amd64 多平台支持
 docker pull hongwenjun/nginx-php:20210703
 docker pull hongwenjun/nginx-php:20210703
 ```
 ```
-### 启动 nginx-php-fpm7.4 容器
+### 启动 nginx-php-fpm8.2 容器
 
 
 ```
 ```
 docker run -d -p 80:80 -p 443:443  \
 docker run -d -p 80:80 -p 443:443  \
@@ -14,13 +14,13 @@ docker run -d -p 80:80 -p 443:443  \
     hongwenjun/nginx-php
     hongwenjun/nginx-php
 ```
 ```
 
 
-## 基于 debian:stable-slim 配置 Docker 容器  nginx-php-fpm7.4 镜像
+## 基于 debian:stable-slim 配置 Docker 容器  nginx-php-fpm8.2 镜像
 
 
 ```
 ```
 # Docker 编译 Dockerfile
 # Docker 编译 Dockerfile
 docker build -t nginx-php https://git.io/nginx-php
 docker build -t nginx-php https://git.io/nginx-php
 
 
-# 测试启动 nginx-php7.4-fpm 容器
+# 测试启动 nginx-php8.2-fpm 容器
 docker run -d -p 8888:80 --name  nginx-php  nginx-php
 docker run -d -p 8888:80 --name  nginx-php  nginx-php
 
 
 # 进入容器
 # 进入容器

+ 2 - 1
default

@@ -39,6 +39,7 @@ server {
         # include snippets/snakeoil.conf;
         # include snippets/snakeoil.conf;
 
 
         root /var/www/html;
         root /var/www/html;
+        client_max_body_size 256m;
 
 
         # Add index.php to the list if you are using PHP
         # Add index.php to the list if you are using PHP
         index index.html index.php index.nginx-debian.html;
         index index.html index.php index.nginx-debian.html;
@@ -57,7 +58,7 @@ server {
                 include snippets/fastcgi-php.conf;
                 include snippets/fastcgi-php.conf;
         #
         #
         #       # With php-fpm (or other unix sockets):
         #       # With php-fpm (or other unix sockets):
-                fastcgi_pass unix:/run/php/php7.4-fpm.sock;
+                fastcgi_pass unix:/run/php/php8.2-fpm.sock;
         #       # With php-cgi (or other tcp sockets):
         #       # With php-cgi (or other tcp sockets):
         #       fastcgi_pass 127.0.0.1:9000;
         #       fastcgi_pass 127.0.0.1:9000;
         }
         }