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..72c71d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [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/) + ## [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/Dockerfile b/Dockerfile index 3b83e25..3fb6f9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -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.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 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 # Install Basic Requirements RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ @@ -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,34 +37,34 @@ RUN buildDeps='curl gcc make autoconf libc-dev zlib1g-dev pkg-config' \ zip \ unzip \ python3-pip \ - python-setuptools \ + python3-setuptools \ git \ libmemcached-dev \ 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 \ - && 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} \ @@ -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/README.md b/README.md index aeef24f..dfb8eae 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 | 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 | @@ -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/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/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
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