Browse Source

升级php 7.3-->7.4

hongwenjun 3 years ago
parent
commit
fbb7e545d0
4 changed files with 11 additions and 17 deletions
  1. 2 2
      Dockerfile
  2. 7 13
      README.md
  3. 1 1
      default
  4. 1 1
      supervisord.conf

+ 2 - 2
Dockerfile

@@ -1,8 +1,8 @@
 FROM debian:stable-slim
 RUN  apt update -y && \
      apt install -y --no-install-recommends --no-install-suggests nginx supervisor wget  \
-     php7.3 php7.3-fpm php7.3-sqlite3 php7.3-xml php7.3-zip php7.3-pgsql php7.3-mbstring  \
-     php7.3-bcmath php7.3-json php7.3-mysql php7.3-gd php7.3-cli php7.3-curl php7.3-cgi && \
+     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 && \
      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/default          --no-check-certificate  && \

+ 7 - 13
README.md

@@ -1,6 +1,6 @@
 ![](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png)
 ## linux/arm,linux/arm64,linux/amd64 多平台支持,甲骨文ARM、华为ARM、香橙派ARM 测试可以使用
-### 启动 nginx-php-fpm7.3 容器
+### 启动 nginx-php-fpm7.4 容器
 
 ```
 docker run -d -p 80:80 -p 443:443  \
@@ -10,18 +10,13 @@ docker run -d -p 80:80 -p 443:443  \
     hongwenjun/nginx-php
 ```
 
-## 基于 debian:stable-slim 配置 Docker 容器  nginx-php-fpm7.3 镜像
+## 基于 debian:stable-slim 配置 Docker 容器  nginx-php-fpm7.4 镜像
 
 ```
-# 下载 nginx-php7.3-fpm 项目源码
-git clone https://github.com/hongwenjun/nginx-php.git
-
-cd nginx-php
-
 # Docker 编译 Dockerfile
-docker build -t nginx-php .
+docker build -t nginx-php https://git.io/nginx-php
 
-# 测试启动 nginx-php7.3-fpm 容器
+# 测试启动 nginx-php7.4-fpm 容器
 docker run -d -p 8888:80 --name  nginx-php  nginx-php
 
 # 进入容器
@@ -29,7 +24,6 @@ docker exec -it  nginx-php bash
 
 ```
 
-
 ###  https://hub.docker.com/ 登陆、建立公共容器 ,先构造容器,再推送到远程
 ```
 docker login
@@ -57,11 +51,11 @@ docker buildx build -t hongwenjun/nginx-php \
 
 -----
 
-##  [Dockerfile](https://raw.githubusercontent.com/hongwenjun/nginx-php/main/Dockerfile) 使用 supervisor 启动 php-fpm  和 nginx 服务
+##  [Dockerfile](https://git.io/nginx-php) 使用 supervisor 启动 php-fpm  和 nginx 服务
 ```
 FROM debian
 
-#  安装 nginx supervisor php7.3-fpm 省略 ......
+#  安装 nginx supervisor php7.4-fpm 省略 ......
 
 #  映射目录和端口和三个配置文件
 EXPOSE 80/tcp  443/tcp
@@ -99,7 +93,7 @@ server {
         location ~ .*\.php(\/.*)*$ {
                 include snippets/fastcgi-php.conf;
         #       # With php-fpm (or other unix sockets):
-                fastcgi_pass unix:/run/php/php7.3-fpm.sock;
+                fastcgi_pass unix:/run/php/php7.4-fpm.sock;
         }
 
 }

+ 1 - 1
default

@@ -57,7 +57,7 @@ server {
                 include snippets/fastcgi-php.conf;
         #
         #       # With php-fpm (or other unix sockets):
-                fastcgi_pass unix:/run/php/php7.3-fpm.sock;
+                fastcgi_pass unix:/run/php/php7.4-fpm.sock;
         #       # With php-cgi (or other tcp sockets):
         #       fastcgi_pass 127.0.0.1:9000;
         }

+ 1 - 1
supervisord.conf

@@ -22,7 +22,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
 serverurl=unix:///dev/shm/supervisor.sock ; use a unix:// URL  for a unix socket
 
 [program:php-fpm]
-command = php-fpm7.3 --force-stderr --nodaemonize --fpm-config  /etc/php/7.3/fpm/php-fpm.conf
+command = php-fpm7.4 --force-stderr --nodaemonize --fpm-config  /etc/php/7.4/fpm/php-fpm.conf
 autostart=true
 autorestart=true
 priority=5