From 9e1b1277eb88dbc43467c8d4ea910bc93c593e0c Mon Sep 17 00:00:00 2001 From: Vladyslav Bondarenko Date: Sun, 24 Sep 2023 14:09:55 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9A=A1=20update=20to=20nginx=201.25.2,?= =?UTF-8?q?=20php=208.2=20&=20composer=202.5.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 ++++++ Dockerfile | 62 ++++++++++++++++++++++++------------------------ README.md | 31 ++++++++++++------------ default.conf | 2 +- supervisord.conf | 2 +- 5 files changed, 56 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f4a5b8..df7f4d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.7.4] - 24-09-2023 +### Update +- nginx version 1.25.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES) +- php version 8.2.9 - [https://secure.php.net/ChangeLog-8.php](https://secure.php.net/ChangeLog-8.php) +- composer version 2.5.8 [https://getcomposer.org/download/](https://getcomposer.org/download/) +- README update + ## [0.7.3] - 11-03-2022 ### Update - build from debian:bullseye-slim image diff --git a/Dockerfile b/Dockerfile index c878c95..3b83e25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="Colin Wilson colin@wyveo.com" # Let the container know that there is no tty ENV DEBIAN_FRONTEND noninteractive -ENV NGINX_VERSION 1.21.6-1~bullseye -ENV php_conf /etc/php/8.1/fpm/php.ini -ENV fpm_conf /etc/php/8.1/fpm/pool.d/www.conf -ENV COMPOSER_VERSION 2.2.7 +ENV NGINX_VERSION 1.25.2-1~bullseye +ENV php_conf /etc/php/8.2/fpm/php.ini +ENV fpm_conf /etc/php/8.2/fpm/pool.d/www.conf +ENV COMPOSER_VERSION 2.5.8 # Install Basic Requirements RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ @@ -43,24 +43,24 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ libmemcached11 \ libmagickwand-dev \ nginx=${NGINX_VERSION} \ - php8.1-fpm \ - php8.1-cli \ - php8.1-bcmath \ - php8.1-dev \ - php8.1-common \ - php8.1-opcache \ - php8.1-readline \ - php8.1-mbstring \ - php8.1-curl \ - php8.1-gd \ - php8.1-imagick \ - php8.1-mysql \ - php8.1-zip \ - php8.1-pgsql \ - php8.1-intl \ - php8.1-xml \ + php8.2-fpm \ + php8.2-cli \ + php8.2-bcmath \ + php8.2-dev \ + php8.2-common \ + php8.2-opcache \ + php8.2-readline \ + php8.2-mbstring \ + php8.2-curl \ + php8.2-gd \ + php8.2-imagick \ + php8.2-mysql \ + php8.2-zip \ + php8.2-pgsql \ + php8.2-intl \ + php8.2-xml \ php-pear \ - && pecl -d php_suffix=8.1 install -o -f redis memcached \ + && pecl -d php_suffix=8.2 install -o -f redis memcached \ && mkdir -p /run/php \ && pip install wheel \ && pip install supervisor \ @@ -72,7 +72,7 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ && sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" ${php_conf} \ && sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" ${php_conf} \ && sed -i -e "s/variables_order = \"GPCS\"/variables_order = \"EGPCS\"/g" ${php_conf} \ - && sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/8.1/fpm/php-fpm.conf \ + && sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/8.2/fpm/php-fpm.conf \ && sed -i -e "s/;catch_workers_output\s*=\s*yes/catch_workers_output = yes/g" ${fpm_conf} \ && sed -i -e "s/pm.max_children = 5/pm.max_children = 4/g" ${fpm_conf} \ && sed -i -e "s/pm.start_servers = 2/pm.start_servers = 3/g" ${fpm_conf} \ @@ -81,15 +81,15 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ && sed -i -e "s/pm.max_requests = 500/pm.max_requests = 200/g" ${fpm_conf} \ && sed -i -e "s/www-data/nginx/g" ${fpm_conf} \ && sed -i -e "s/^;clear_env = no$/clear_env = no/" ${fpm_conf} \ - && echo "extension=redis.so" > /etc/php/8.1/mods-available/redis.ini \ - && echo "extension=memcached.so" > /etc/php/8.1/mods-available/memcached.ini \ - && echo "extension=imagick.so" > /etc/php/8.1/mods-available/imagick.ini \ - && ln -sf /etc/php/8.1/mods-available/redis.ini /etc/php/8.1/fpm/conf.d/20-redis.ini \ - && ln -sf /etc/php/8.1/mods-available/redis.ini /etc/php/8.1/cli/conf.d/20-redis.ini \ - && ln -sf /etc/php/8.1/mods-available/memcached.ini /etc/php/8.1/fpm/conf.d/20-memcached.ini \ - && ln -sf /etc/php/8.1/mods-available/memcached.ini /etc/php/8.1/cli/conf.d/20-memcached.ini \ - && ln -sf /etc/php/8.1/mods-available/imagick.ini /etc/php/8.1/fpm/conf.d/20-imagick.ini \ - && ln -sf /etc/php/8.1/mods-available/imagick.ini /etc/php/8.1/cli/conf.d/20-imagick.ini \ + && echo "extension=redis.so" > /etc/php/8.2/mods-available/redis.ini \ + && echo "extension=memcached.so" > /etc/php/8.2/mods-available/memcached.ini \ + && echo "extension=imagick.so" > /etc/php/8.2/mods-available/imagick.ini \ + && ln -sf /etc/php/8.2/mods-available/redis.ini /etc/php/8.2/fpm/conf.d/20-redis.ini \ + && ln -sf /etc/php/8.2/mods-available/redis.ini /etc/php/8.2/cli/conf.d/20-redis.ini \ + && ln -sf /etc/php/8.2/mods-available/memcached.ini /etc/php/8.2/fpm/conf.d/20-memcached.ini \ + && ln -sf /etc/php/8.2/mods-available/memcached.ini /etc/php/8.2/cli/conf.d/20-memcached.ini \ + && ln -sf /etc/php/8.2/mods-available/imagick.ini /etc/php/8.2/fpm/conf.d/20-imagick.ini \ + && ln -sf /etc/php/8.2/mods-available/imagick.ini /etc/php/8.2/cli/conf.d/20-imagick.ini \ # Install Composer && curl -o /tmp/composer-setup.php https://getcomposer.org/installer \ && curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \ diff --git a/README.md b/README.md index 936447d..aeef24f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ -[![Docker Hub; wyveo/nginx-php-fpm](https://img.shields.io/badge/docker%20hub-wyveo%2Fnginx--php--fpm-blue.svg?&logo=docker&style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://badges.weareopensource.me/docker/pulls/wyveo/nginx-php-fpm?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://img.shields.io/docker/image-size/wyveo/nginx-php-fpm/latest?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![nginx 1.21.6](https://img.shields.io/badge/nginx-1.21.6-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 8.1.3](https://img.shields.io/badge/php--fpm-8.1.3-blue.svg?&logo=php&logoColor=white&style=for-the-badge)](https://secure.php.net/releases/8_1_3.php) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?&style=for-the-badge)](https://github.com/wyveo/nginx-php-fpm/blob/master/LICENSE) +[![Docker Hub; wyveo/nginx-php-fpm](https://img.shields.io/badge/docker%20hub-wyveo%2Fnginx--php--fpm-blue.svg?&logo=docker&style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://badges.weareopensource.me/docker/pulls/wyveo/nginx-php-fpm?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![](https://img.shields.io/docker/image-size/wyveo/nginx-php-fpm/latest?style=for-the-badge)](https://hub.docker.com/r/wyveo/nginx-php-fpm/) [![nginx 1.25.2](https://img.shields.io/badge/nginx-1.25.2-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 8.2.9](https://img.shields.io/badge/php--fpm-8.2.9-blue.svg?&logo=php&logoColor=white&style=for-the-badge)](https://secure.php.net/releases/8_2_9.php) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?&style=for-the-badge)](https://github.com/wyveo/nginx-php-fpm/blob/master/LICENSE) ## Introduction -This is a Dockerfile to build a debian based container image running nginx and php-fpm 8.1.x / 8.0.x / 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x & Composer. +This is a Dockerfile to build a debian based container image running nginx and php-fpm 8.2.x / 8.1.x / 8.0.x / 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x & Composer. ### Versioning -| Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer -|-----|-------|-----|--------|--------|------| -| latest | master Branch |1.21.6 | 8.1.3 | bullseye | 2.2.7 | -| php81 | php81 Branch |1.21.6 | 8.1.3 | bullseye | 2.2.7 | -| php80 | php80 Branch |1.21.6 | 8.0.16 | buster | 2.0.13 | -| php74 | php74 Branch |1.21.6 | 7.4.28 | buster | 2.0.13 | -| php73 | php73 Branch |1.21.6 | 7.3.33 | buster | 2.0.13 | -| php72 | php72 Branch |1.21.6 | 7.2.34 | buster | 2.0.13 | -| php71 | php71 Branch |1.21.6 | 7.1.33 | buster | 2.0.13 | -| php70 | php70 Branch |1.21.6 | 7.0.33 | buster | 2.0.13 | +| Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer +|------------|----------------|---------------|-------------|----------------|----------| +| latest | master Branch | 1.25.2 | 8.2.9 | bullseye | 2.5.8 | +| php82 | php82 Branch | 1.25.2 | 8.2.9 | bullseye | 2.5.8 | +| php81 | php81 Branch | 1.21.6 | 8.1.3 | bullseye | 2.2.7 | +| php80 | php80 Branch | 1.21.6 | 8.0.16 | buster | 2.0.13 | +| php74 | php74 Branch | 1.21.6 | 7.4.28 | buster | 2.0.13 | +| php73 | php73 Branch | 1.21.6 | 7.3.33 | buster | 2.0.13 | +| php72 | php72 Branch | 1.21.6 | 7.2.34 | buster | 2.0.13 | +| php71 | php71 Branch | 1.21.6 | 7.1.33 | buster | 2.0.13 | +| php70 | php70 Branch | 1.21.6 | 7.0.33 | buster | 2.0.13 | ## Building from source To build from source you need to clone the git repo and run docker build: @@ -24,19 +25,19 @@ $ cd nginx-php-fpm followed by ``` -$ docker build -t nginx-php-fpm:php81 . # PHP 8.1.x +$ docker build -t nginx-php-fpm:php82 . # PHP 8.2.x ``` ## Pulling from Docker Hub ``` -$ docker pull wyveo/nginx-php-fpm:php81 +$ docker pull wyveo/nginx-php-fpm:php82 ``` ## Running To run the container: ``` -$ sudo docker run -d wyveo/nginx-php-fpm:php81 +$ sudo docker run -d wyveo/nginx-php-fpm:php82 ``` Default web root: diff --git a/default.conf b/default.conf index 2c4f3e1..9364d16 100644 --- a/default.conf +++ b/default.conf @@ -43,7 +43,7 @@ server { location ~ \.php$ { try_files $uri $uri/ /index.php?$query_string; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; diff --git a/supervisord.conf b/supervisord.conf index 4535fb1..bd51aaf 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -24,7 +24,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket [program:php-fpm8] -command=/usr/sbin/php-fpm8.1 --nodaemonize --fpm-config=/etc/php/8.1/fpm/pool.d/www.conf +command=/usr/sbin/php-fpm8.2 --nodaemonize --fpm-config=/etc/php/8.2/fpm/pool.d/www.conf autostart=true autorestart=true priority=5 From 0bc95470bc8d8e548c1434bd896c488e21a6ad5b Mon Sep 17 00:00:00 2001 From: Colin Wilson Date: Tue, 26 Sep 2023 00:32:04 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9A=A1=20update=20index.php,=20update=20?= =?UTF-8?q?image=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest.yaml | 2 +- CHANGELOG.md | 1 + html/index.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index 2555ca3..cb59c47 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -1,4 +1,4 @@ -name: Publish PHP 8.1 image to Docker Hub +name: Publish PHP 8.2 image to Docker Hub on: push: jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index df7f4d3..88ddf04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - php version 8.2.9 - [https://secure.php.net/ChangeLog-8.php](https://secure.php.net/ChangeLog-8.php) - composer version 2.5.8 [https://getcomposer.org/download/](https://getcomposer.org/download/) - README update +- index.php update ## [0.7.3] - 11-03-2022 ### Update diff --git a/html/index.php b/html/index.php index 62972d3..d30d22f 100644 --- a/html/index.php +++ b/html/index.php @@ -36,7 +36,7 @@

Congratulations!

-

You have successfully deployed a docker container running our NGINX with PHP-FPM 8.1.x image

+

You have successfully deployed a docker container running our NGINX with PHP-FPM 8.2.x image

NGINX: v
PHP-FPM: v
LOADED CONFIG:
WEB ROOT:
HOSTNAME:

Thank you for using wyveo.com