diff --git a/nginx-php-7.4/Demo/SingleNode/docker-compose.yml b/nginx-php-7.4/Demo/SingleNode/docker-compose.yml index cb279ad..3bd35c1 100644 --- a/nginx-php-7.4/Demo/SingleNode/docker-compose.yml +++ b/nginx-php-7.4/Demo/SingleNode/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: nginx-php: - image: harbor.colben.cn/general/nginx-php + image: harbor.colben.cn/general/nginx-php:7.4 container_name: nginx-php restart: "on-failure" stop_grace_period: 5m diff --git a/nginx-php/ADD/ccmd b/nginx-php-8.1/ADD/ccmd similarity index 98% rename from nginx-php/ADD/ccmd rename to nginx-php-8.1/ADD/ccmd index 62fbcb6..6c92bf5 100755 --- a/nginx-php/ADD/ccmd +++ b/nginx-php-8.1/ADD/ccmd @@ -6,7 +6,7 @@ # - /etc/nginx/http.d # # - /var/lib/nginx/html # # - /var/log/nginx # -# - /var/log/php7 # +# - /var/log/php81 # # ENV # # - GLOBAL_DIRECTIVES # ################################################## diff --git a/nginx-php/Demo/SingleNode/README.md b/nginx-php-8.1/Demo/SingleNode/README.md similarity index 100% rename from nginx-php/Demo/SingleNode/README.md rename to nginx-php-8.1/Demo/SingleNode/README.md diff --git a/nginx-php/Demo/SingleNode/docker-compose.yml b/nginx-php-8.1/Demo/SingleNode/docker-compose.yml similarity index 80% rename from nginx-php/Demo/SingleNode/docker-compose.yml rename to nginx-php-8.1/Demo/SingleNode/docker-compose.yml index cb279ad..7b27980 100644 --- a/nginx-php/Demo/SingleNode/docker-compose.yml +++ b/nginx-php-8.1/Demo/SingleNode/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: nginx-php: - image: harbor.colben.cn/general/nginx-php + image: harbor.colben.cn/general/nginx-php:8.1 container_name: nginx-php restart: "on-failure" stop_grace_period: 5m @@ -20,6 +20,6 @@ services: source: ./nginx/log target: /var/log/nginx - type: bind - source: ./php7/log - target: /var/log/php7 + source: ./php81/log + target: /var/log/php81 diff --git a/nginx-php/Demo/SingleNode/nginx/http.d/80.conf b/nginx-php-8.1/Demo/SingleNode/nginx/http.d/80.conf similarity index 100% rename from nginx-php/Demo/SingleNode/nginx/http.d/80.conf rename to nginx-php-8.1/Demo/SingleNode/nginx/http.d/80.conf diff --git a/nginx-php/Dockerfile b/nginx-php-8.1/Dockerfile similarity index 100% rename from nginx-php/Dockerfile rename to nginx-php-8.1/Dockerfile diff --git a/nginx-php/README.md b/nginx-php-8.1/README.md similarity index 86% rename from nginx-php/README.md rename to nginx-php-8.1/README.md index 81a1d65..fd47deb 100644 --- a/nginx-php/README.md +++ b/nginx-php-8.1/README.md @@ -1,7 +1,7 @@ # 构建 nginx-php 镜像 ## 定制 -- 安装 nginx 和 php7 +- 安装 nginx 和 php81 - 固定一些常用配置 - 每 10 秒扫描一次配置文件,有变更会立即 reload @@ -10,7 +10,7 @@ - /etc/nginx/http.d: nginx http 配置文件 - /var/lib/nginx/html: nginx 前端文件存放目录 - /var/log/nginx: nginx 日志目录 -- /var/log/php7: php7 日志目录 +- /var/log/php81: php81 日志目录 ## 案例 - [Demo/SingleNode/](Demo/SingleNode/): 部署 nginx-php diff --git a/nginx-php/nginx-php.sh b/nginx-php-8.1/nginx-php.sh similarity index 96% rename from nginx-php/nginx-php.sh rename to nginx-php-8.1/nginx-php.sh index 7c036fd..e5eb9bf 100755 --- a/nginx-php/nginx-php.sh +++ b/nginx-php-8.1/nginx-php.sh @@ -9,7 +9,7 @@ export LANG=en_US.UTF-8 [ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)" ROOT_DIR="$(cd $(dirname $0) && pwd)" -IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:latest" +IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:8.1" if [ -t 0 ]; then function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; } diff --git a/nginx-php/Dockerfile-3.9 b/nginx-php/Dockerfile-3.9 deleted file mode 100644 index 0cf9f39..0000000 --- a/nginx-php/Dockerfile-3.9 +++ /dev/null @@ -1,26 +0,0 @@ -FROM alpine:3.9 -MAINTAINER Colben colbenlee@gmail.com -ADD --chown=root:root /ADD/ /opt/ -ENV PS1='\[\e[33;1;1m\][\[\e[0m\]\[\e[35;1m\]\u\[\e[0m\]\[\e[33;1;1m\]@\[\e[0m\]\[\e[31;1;1m\]docker\[\e[0m\]\[\e[32;1;1m\](\h)\[\e[0m\]\[\e[33;1;1m\]:\[\e[0m\]\[\e[32m\]\w\[\e[0m\]\[\e[33;1;1m\]]\[\e[0m\]\[\e[36m\]\$\[\e[0m\] ' -ENV PS2='\[\e[36m\]>\[\e[0m\] ' -ENV LANG=en_US.UTF-8 -RUN ln -s /opt/localtime /etc/localtime \ - && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ - && apk update \ - && apk add --no-cache bash curl coreutils nginx php7 php7-common php7-session php7-openssl php7-iconv php7-json php7-gd php7-curl php7-xml php7-mysqli php7-imap php7-cgi fcgi php7-pdo php7-pdo_mysql php7-soap php7-xmlrpc php7-posix php7-mcrypt php7-gettext php7-ldap php7-ctype php7-dom php7-fpm php7-mbstring php7-mysqlnd php7-bcmath \ - && sed -i -e '/^;* *max_execution_time *=/cmax_execution_time = 300' \ - -e '/^;* *memory_limit *=/cmemory_limit = 1024M' \ - -e '/^;* *post_max_size *=/cpost_max_size = 1024M' \ - -e '/^;* *upload_max_filesize *=/cupload_max_filesize = 1024M' \ - -e '/^;* *max_input_time *=/cmax_input_time = 300' \ - -e '/^;* *max_input_vars *=/cmax_input_vars = 10000' \ - -e '/^;* *date.timezone *=/cdate.timezone = PRC' \ - /etc/php7/php.ini \ - && sed -i -e '/^;* *listen *=/clisten = /var/lib/php7/phpfpm.sock' \ - -e '/^;* *listen.mode *=/clisten.mode = 0666' \ - /etc/php7/php-fpm.d/www.conf \ - && mkdir /run/nginx \ - && chown nginx:nginx /run/nginx \ - && rm -rf /var/cache/apk/* /etc/nginx/conf.d/* -CMD ["/opt/ccmd"] -