From be67c57b5fe75cca9ee6e20cc88055eeb7b5b4b5 Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Wed, 28 Feb 2024 11:00:27 -0500 Subject: [PATCH 1/6] update php to 8.3 --- Dockerfile | 58 ++++++++++++++++++++++++------------------------ default.conf | 2 +- supervisord.conf | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b83e25..eafb413 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ LABEL maintainer="Colin Wilson colin@wyveo.com" # Let the container know that there is no tty ENV DEBIAN_FRONTEND noninteractive 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 +ENV php_conf /etc/php/8.3/fpm/php.ini +ENV fpm_conf /etc/php/8.3/fpm/pool.d/www.conf # 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.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 \ + php8.3-fpm \ + php8.3-cli \ + php8.3-bcmath \ + php8.3-dev \ + php8.3-common \ + php8.3-opcache \ + php8.3-readline \ + php8.3-mbstring \ + php8.3-curl \ + php8.3-gd \ + php8.3-imagick \ + php8.3-mysql \ + php8.3-zip \ + php8.3-pgsql \ + php8.3-intl \ + php8.3-xml \ php-pear \ - && pecl -d php_suffix=8.2 install -o -f redis memcached \ + && pecl -d php_suffix=8.3 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.2/fpm/php-fpm.conf \ + && sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/8.3/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.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 \ + && echo "extension=redis.so" > /etc/php/8.3/mods-available/redis.ini \ + && echo "extension=memcached.so" > /etc/php/8.3/mods-available/memcached.ini \ + && echo "extension=imagick.so" > /etc/php/8.3/mods-available/imagick.ini \ + && ln -sf /etc/php/8.3/mods-available/redis.ini /etc/php/8.3/fpm/conf.d/20-redis.ini \ + && ln -sf /etc/php/8.3/mods-available/redis.ini /etc/php/8.3/cli/conf.d/20-redis.ini \ + && ln -sf /etc/php/8.3/mods-available/memcached.ini /etc/php/8.3/fpm/conf.d/20-memcached.ini \ + && ln -sf /etc/php/8.3/mods-available/memcached.ini /etc/php/8.3/cli/conf.d/20-memcached.ini \ + && ln -sf /etc/php/8.3/mods-available/imagick.ini /etc/php/8.3/fpm/conf.d/20-imagick.ini \ + && ln -sf /etc/php/8.3/mods-available/imagick.ini /etc/php/8.3/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/default.conf b/default.conf index 9364d16..b1e1d06 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.2-fpm.sock; + fastcgi_pass unix:/run/php/php8.3-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 bd51aaf..0a2dc3c 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.2 --nodaemonize --fpm-config=/etc/php/8.2/fpm/pool.d/www.conf +command=/usr/sbin/php-fpm8.3 --nodaemonize --fpm-config=/etc/php/8.3/fpm/pool.d/www.conf autostart=true autorestart=true priority=5 From 8d29287f6b57502737f40dfec5edd9267f485f55 Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Wed, 28 Feb 2024 11:00:41 -0500 Subject: [PATCH 2/6] update nginx to 1.25.4 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eafb413..dc4b764 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ LABEL maintainer="Colin Wilson colin@wyveo.com" # Let the container know that there is no tty ENV DEBIAN_FRONTEND noninteractive -ENV NGINX_VERSION 1.25.2-1~bullseye ENV COMPOSER_VERSION 2.5.8 +ENV NGINX_VERSION 1.25.4-1~bullseye ENV php_conf /etc/php/8.3/fpm/php.ini ENV fpm_conf /etc/php/8.3/fpm/pool.d/www.conf From 707cdf619740b625d888d01e73e68c40b02c5673 Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Wed, 28 Feb 2024 11:00:50 -0500 Subject: [PATCH 3/6] update composer to 2.7.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dc4b764..7148fdf 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 COMPOSER_VERSION 2.5.8 ENV NGINX_VERSION 1.25.4-1~bullseye ENV php_conf /etc/php/8.3/fpm/php.ini ENV fpm_conf /etc/php/8.3/fpm/pool.d/www.conf +ENV COMPOSER_VERSION 2.7.1 # Install Basic Requirements RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ From dd58325f73a86c5c0db090f0ca368b9324a2a4bc Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Wed, 28 Feb 2024 11:01:22 -0500 Subject: [PATCH 4/6] update README & other info files --- .github/workflows/latest.yaml | 2 +- CHANGELOG.md | 5 +++++ README.md | 15 ++++++++------- html/index.php | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index cb59c47..4a842f1 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -1,4 +1,4 @@ -name: Publish PHP 8.2 image to Docker Hub +name: Publish PHP 8.3 image to Docker Hub on: push: jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ddf04..b0db901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.7.5] - 28-02-2024 +- nginx version 1.25.4 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES) +- php version 8.3.3 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php) +- composer version 2.7.1 [https://getcomposer.org/download/](https://getcomposer.org/download/) + ## [0.7.4] - 24-09-2023 ### Update - nginx version 1.25.2 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES) diff --git a/README.md b/README.md index aeef24f..2f97dcd 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -[![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) +[![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.4](https://img.shields.io/badge/nginx-1.25.4-brightgreen.svg?&logo=nginx&logoColor=white&style=for-the-badge)](https://nginx.org/en/CHANGES) [![php 8.3.3](https://img.shields.io/badge/php--fpm-8.3.3-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.2.x / 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.3.x / 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 +| Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer |------------|----------------|---------------|-------------|----------------|----------| -| latest | master Branch | 1.25.2 | 8.2.9 | bullseye | 2.5.8 | +| latest | master Branch | 1.25.4 | 8.3.3 | bullseye | 2.7.1 | +| php83 | php83 Branch | 1.25.4 | 8.3.3 | bullseye | 2.7.1 | | 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 | @@ -25,19 +26,19 @@ $ cd nginx-php-fpm followed by ``` -$ docker build -t nginx-php-fpm:php82 . # PHP 8.2.x +$ docker build -t nginx-php-fpm:php83 . # PHP 8.3.x ``` ## Pulling from Docker Hub ``` -$ docker pull wyveo/nginx-php-fpm:php82 +$ docker pull wyveo/nginx-php-fpm:php83 ``` ## Running To run the container: ``` -$ sudo docker run -d wyveo/nginx-php-fpm:php82 +$ sudo docker run -d wyveo/nginx-php-fpm:php83 ``` Default web root: diff --git a/html/index.php b/html/index.php index d30d22f..2e736f6 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.2.x image

+

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

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

Thank you for using wyveo.com
From 03e751556da95925c346d3633216d533f5ff0b58 Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Wed, 28 Feb 2024 16:23:40 -0500 Subject: [PATCH 5/6] bullseye -> bookworm --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7148fdf..3fb6f9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim LABEL maintainer="Colin Wilson colin@wyveo.com" # Let the container know that there is no tty ENV DEBIAN_FRONTEND noninteractive -ENV NGINX_VERSION 1.25.4-1~bullseye +ENV NGINX_VERSION 1.25.4-1~bookworm ENV php_conf /etc/php/8.3/fpm/php.ini ENV fpm_conf /etc/php/8.3/fpm/pool.d/www.conf ENV COMPOSER_VERSION 2.7.1 @@ -27,7 +27,7 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ apt-key adv --batch --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \ done; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ - echo "deb http://nginx.org/packages/mainline/debian/ bullseye nginx" >> /etc/apt/sources.list \ + echo "deb http://nginx.org/packages/mainline/debian/ bookworm nginx" >> /etc/apt/sources.list \ && wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \ && apt-get update \ @@ -37,7 +37,7 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ zip \ unzip \ python3-pip \ - python-setuptools \ + python3-setuptools \ git \ libmemcached-dev \ libmemcached11 \ @@ -62,9 +62,9 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ php-pear \ && pecl -d php_suffix=8.3 install -o -f redis memcached \ && mkdir -p /run/php \ - && pip install wheel \ - && pip install supervisor \ - && pip install git+https://github.com/coderanger/supervisor-stdout \ + && pip install wheel --break-system-packages \ + && pip install supervisor --break-system-packages \ + && pip install git+https://github.com/coderanger/supervisor-stdout --break-system-packages \ && echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d \ && rm -rf /etc/nginx/conf.d/default.conf \ && sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" ${php_conf} \ From 329bc158f3856d298f5b6ceb02e4f94a5a237e1f Mon Sep 17 00:00:00 2001 From: Adam Ryan Merrifield Date: Thu, 29 Feb 2024 08:58:56 -0500 Subject: [PATCH 6/6] update README --- CHANGELOG.md | 3 ++- README.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0db901..72c71d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -## [0.7.5] - 28-02-2024 +## [0.7.5] - 29-02-2024 +- build from debian:bookworm-slim image - nginx version 1.25.4 - [http://nginx.org/en/CHANGES](http://nginx.org/en/CHANGES) - php version 8.3.3 - [https://secure.php.net/ChangeLog-7.php](https://secure.php.net/ChangeLog-8.php) - composer version 2.7.1 [https://getcomposer.org/download/](https://getcomposer.org/download/) diff --git a/README.md b/README.md index 2f97dcd..dfb8eae 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ This is a Dockerfile to build a debian based container image running nginx and p ### Versioning | Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer |------------|----------------|---------------|-------------|----------------|----------| -| latest | master Branch | 1.25.4 | 8.3.3 | bullseye | 2.7.1 | -| php83 | php83 Branch | 1.25.4 | 8.3.3 | bullseye | 2.7.1 | +| latest | master Branch | 1.25.4 | 8.3.3 | bookworm | 2.7.1 | +| php83 | php83 Branch | 1.25.4 | 8.3.3 | bookworm | 2.7.1 | | 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 |