Skip to content

Commit

Permalink
💥 Bye bye PHP 8.2 and welcome PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui committed Dec 21, 2024
1 parent aa553e3 commit e799f58
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/devops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
GHCR_REGISTRY: ghcr.io
IMAGE_NAME: llaumgui/php
LATEST: '8.3'
LATEST: '8.4'

jobs:
##############################################################################
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.3-nextcloud"]
php-version: ["8.3", "8.3-nextcloud", "8.4"]
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.3-nextcloud"]
php-version: ["8.3", "8.3-nextcloud", "8.4"]
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand Down
22 changes: 17 additions & 5 deletions 8.2/Dockerfile → 8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# My php-fpm image, based on alpine Linux, configured and forked from the
# official PHP docker repository.
# @see: https://store.docker.com/images/php
FROM php:8.2-fpm-alpine
FROM php:8.4-fpm-alpine

LABEL org.opencontainers.image.title="llaumgui/php-fpm"
LABEL org.opencontainers.image.description="Fork of php-fpm:8.2"
LABEL org.opencontainers.image.description="Fork of php-fpm:8.4"
LABEL org.opencontainers.image.vendor="Guillaume Kulakowski"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.version="8.2"
LABEL org.opencontainers.image.version="8.4"


# ---------------------------------------------------------- Setup build options
Expand Down Expand Up @@ -155,7 +155,19 @@ RUN if [ "${DOCKER_PHP_ENABLE_IMAGICK}" != "off" ]; then \
# Build dependancy for imagick \
apk add --update --no-cache --virtual .docker-php-imagick-dependancies \
imagemagick-dev && \
printf "\n" | pecl install imagick && \
#printf "\n" | pecl install imagick && \
# Tempory workaround - BEGIN \
git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \
cd /tmp/imagick && \
git fetch origin master && \
git switch master && \
cd /tmp/imagick && \
sed -i 's/php_strtolower/zend_str_tolower/g' imagick.c && \
phpize && \
./configure && \
make && \
make install && \
# Tempory workaround - END \
docker-php-ext-enable imagick && \
apk del .docker-php-imagick-dependancies && \
php -m; \
Expand Down Expand Up @@ -325,7 +337,7 @@ RUN if [ "${DOCKER_PHP_ENABLE_COMPOSER}" != "off" ]; then \

# ---------------------------------------------------------------- Configuration
# My configuration.
RUN sed -i "s/^;security.limit_extensions =.*/security.limit_extensions = .php .php8 .php82/g" /usr/local/etc/php-fpm.d/www.conf
RUN sed -i "s/^;security.limit_extensions =.*/security.limit_extensions = .php .php8 .php84/g" /usr/local/etc/php-fpm.d/www.conf
COPY php.d /usr/local/etc/php/conf.d
COPY etc /usr/local/etc/php

Expand Down
20 changes: 10 additions & 10 deletions 8.2/README.md → 8.4/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# PHP 8.2 (PHP-FPM) on alpine Linux
# PHP 8.4 (PHP-FPM) on alpine Linux

[![Author][ico-twitter]][link-twitter]
[![Build Status][ico-ghactions]][link-ghactions]
[![Docker Pull][ico-docker]][link-docker]
[![Latest Version][ico-version]][link-docker]
[![Software License][ico-license]](LICENSE)

PHP 8.2 image:
PHP 8.4 image:

* Forked from [official PHP-FPM build with alpine Linux](https://store.docker.com/images/php) (php:8.2-fpm-alpine).
* Forked from [official PHP-FPM build with alpine Linux](https://store.docker.com/images/php) (php:8.4-fpm-alpine).
* Additionals PHP extensions:
* bcmath
* gd
Expand Down Expand Up @@ -50,17 +50,17 @@ You can run this container with docker client:
docker run -d \
--volumes /docker/volumes/www:/var/www \
--expose 9000 \
llaumgui/php:8.2-fpm
llaumgui/php:8.4-fpm
~~~

### With compose

You can use this container in a docker-compose.yml file:

~~~yaml
php82:
container_name: php82
image: llaumgui/php:8.2-fpm
php84:
container_name: php84
image: llaumgui/php:8.4-fpm
restart: always
environment:
TZ: 'Europe/Paris'
Expand All @@ -73,9 +73,9 @@ You can use this container in a docker-compose.yml file:
## Rebuild with less extensions

~~~yaml
php82:
container_name: php:8.2-fpm
image: llaumgui/php:8.2-fpm
php84:
container_name: php:8.4-fpm
image: llaumgui/php:8.4-fpm
build:
context: ../PATH_TO_DOCKERFILE/
args:
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ currently being supported with security updates.

| Version | Supported |
| --------------| ------------------ |
| 8.4 | :white_check_mark: |
| 8.4-nextcloud | :white_check_mark: |
| 8.3-nextcloud | :white_check_mark: |
| 8.3 | :white_check_mark: |
| 8.2-nextcloud | :x: |
| 8.2 | :white_check_mark: |
| 8.2 | :x: |
| 8.1 | :x: |
| 8.0 | :x: |
| < 8.0 | :x: |
Expand Down

0 comments on commit e799f58

Please sign in to comment.