From 88d44ed550dabd0ad356ac480a28e1afe8040d31 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 13 Jun 2026 19:42:18 +0200 Subject: [PATCH 1/5] Updated specsnl github-actions version --- .github/workflows/main.yml | 4 ++-- .github/workflows/pr.yml | 4 ++-- .github/workflows/tag.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ef2332..99c0b51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ concurrency: jobs: build: - uses: specsnl/github-actions/.github/workflows/build-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/build-php.yml@2.1.0 strategy: fail-fast: false matrix: @@ -38,7 +38,7 @@ jobs: dockerfile: ${{ matrix.docker.dockerfile }} merge: - uses: specsnl/github-actions/.github/workflows/merge-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/merge-php.yml@2.1.0 needs: build strategy: matrix: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5393293..a4502bc 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,7 +14,7 @@ concurrency: jobs: build: - uses: specsnl/github-actions/.github/workflows/build-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/build-php.yml@2.1.0 strategy: fail-fast: false matrix: @@ -37,7 +37,7 @@ jobs: dockerfile: ${{ matrix.docker.dockerfile }} merge: - uses: specsnl/github-actions/.github/workflows/merge-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/merge-php.yml@2.1.0 needs: build strategy: matrix: diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index fb5b210..fe5f3a1 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -15,7 +15,7 @@ concurrency: jobs: build: - uses: specsnl/github-actions/.github/workflows/build-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/build-php.yml@2.1.0 strategy: fail-fast: false matrix: @@ -38,7 +38,7 @@ jobs: dockerfile: ${{ matrix.docker.dockerfile }} merge: - uses: specsnl/github-actions/.github/workflows/merge-php.yml@1.2.3 + uses: specsnl/github-actions/.github/workflows/merge-php.yml@2.1.0 needs: build strategy: matrix: From 68bce9875ffef17838393f838568d889242e0a84 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 13 Jun 2026 19:43:55 +0200 Subject: [PATCH 2/5] Updated PHP image tag version --- apache/Dockerfile | 2 +- fpm/Dockerfile | 2 +- frankenphp/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index b38bcfd..6550734 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -2,7 +2,7 @@ # check=error=true # Latest version of PHP base image: https://hub.docker.com/_/php/tags -FROM php:8.5.6-apache-trixie AS runtime +FROM php:8.5.7-apache-trixie AS runtime ARG DEBIAN_FRONTEND=noninteractive diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 2d50fad..1f81ee9 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -2,7 +2,7 @@ # check=error=true # Latest version of PHP base image: https://hub.docker.com/_/php/tags -FROM php:8.5.6-fpm-trixie AS runtime +FROM php:8.5.7-fpm-trixie AS runtime ARG DEBIAN_FRONTEND=noninteractive diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index 4fe1f67..f96ab0f 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -2,7 +2,7 @@ # check=error=true # Latest version of FrankenPHP base image: https://hub.docker.com/r/dunglas/frankenphp/tags -FROM dunglas/frankenphp:1.12.4-php8.5.6-trixie AS runtime +FROM dunglas/frankenphp:1.12.4-php8.5.7-trixie AS runtime ARG DEBIAN_FRONTEND=noninteractive From 2342c77d46428214641b0e53936e5c88c91422fb Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 13 Jun 2026 19:44:46 +0200 Subject: [PATCH 3/5] Updated xdebug extension version --- apache/Dockerfile | 2 +- fpm/Dockerfile | 2 +- frankenphp/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index 6550734..57735f7 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -149,7 +149,7 @@ ARG PHIVE_VERSION=0.16.0 # Latest version of Composer: https://getcomposer.org/download ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug -ARG XDEBUG_VERSION=3.5.1 +ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 1f81ee9..841e5c8 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -149,7 +149,7 @@ ARG PHIVE_VERSION=0.16.0 # Latest version of Composer: https://getcomposer.org/download ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug -ARG XDEBUG_VERSION=3.5.1 +ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index f96ab0f..16dcbc6 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -154,7 +154,7 @@ ARG PHIVE_VERSION=0.16.0 # Latest version of Composer: https://getcomposer.org/download ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug -ARG XDEBUG_VERSION=3.5.1 +ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 From 3851c53350181365be65e45cd4766a452d594d98 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sun, 14 Jun 2026 01:41:37 +0200 Subject: [PATCH 4/5] Simplified installing PHP extension by using install-php-extensions Also remove pie, phive and remove node repository and rely more on official images. That also means they get auto-updated by dependabot. This change also makes it very easy to switch from Debian to Alpine in the future. --- apache/Dockerfile | 150 +++++++----------------------------------- fpm/Dockerfile | 148 +++++++---------------------------------- frankenphp/Dockerfile | 150 +++++++----------------------------------- 3 files changed, 74 insertions(+), 374 deletions(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index 57735f7..b8936f0 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -16,7 +16,7 @@ ARG XDG_CACHE_HOME=/cache ENV XDG_CACHE_HOME=$XDG_CACHE_HOME # Latest version of event-extension: https://packagist.org/packages/osmanov/pecl-event -ARG PHP_EVENT_VERSION=3.1.5 +ARG PHP_EVENT_VERSION=3.1.4 # Latest version of igbinary-extension: https://packagist.org/packages/igbinary/igbinary ARG PHP_IGBINARY_VERSION=3.2.17RC1 # Latest version of redis-extension: https://packagist.org/packages/phpredis/phpredis @@ -24,72 +24,15 @@ ARG PHP_REDIS_VERSION=6.3.0 # Latest version of amqp-extension: https://packagist.org/packages/php-amqp/php-amqp ARG PHP_AMQP_VERSION=2.2.0 -ENV SMTPHOST=mail -ENV SMTPEHLO=localhost - WORKDIR /var/www -# Latest version of Pie: https://github.com/php/pie/releases -COPY --from=ghcr.io/php/pie:1.4.5-bin /pie /usr/bin/pie - -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ apt-transport-https \ ca-certificates \ openssl \ - curl \ - msmtp-mta \ - unzip \ - # Dependency of the PHP intl-extension - libicu76 \ - # Dependency of the PHP gd-extension - libpng16-16t64 \ - libwebp7 \ - libjpeg62-turbo \ - libfreetype6 \ - # Dependency of PHP zip-extension - libzip5 \ - # Dependency of PHP event-extension - libevent-2.1-7t64 \ - libevent-openssl-2.1-7t64 \ - libevent-extra-2.1-7t64 \ - # Dependency of PHP pdo_pgsql-extension - libpq5 \ - # Dependency of PHP amqp-extension - librabbitmq4 \ - # Dependency of PHP xsl-extension - libxslt1.1 \ - # Install packages that are needed for building PHP extensions - && apt-get install --assume-yes --no-install-recommends \ - $PHPIZE_DEPS \ - # Dependency of the PHP intl-extension - libicu-dev \ - # Dependencies of PHP gd-extension - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - # Dependency of PHP zip-extension - libzip-dev \ - # Dependency of PHP event-extension - libevent-dev \ - libssl-dev \ - # Dependency of PHP soap-extension - libxml2-dev \ - # Dependency of PHP pdo_pgsql-extension - libpq-dev \ - # Dependency of PHP amqp-extension - librabbitmq-dev \ - # Dependency of PHP xsl-extension - libxslt1-dev \ - # Configure PHP gd-extension - && docker-php-ext-configure gd \ - --enable-gd \ - --with-jpeg \ - --with-freetype \ - --with-webp \ - # Install PHP extensions - && docker-php-ext-install -j "$(nproc --all)" \ + && install-php-extensions \ pdo_mysql \ pdo_pgsql \ intl \ @@ -99,33 +42,12 @@ RUN apt-get update \ zip \ soap \ xsl \ - # Dependency of PHP event-extension sockets \ - && pie install --skip-enable-extension osmanov/pecl-event:$PHP_EVENT_VERSION \ - && pie install --skip-enable-extension igbinary/igbinary:$PHP_IGBINARY_VERSION \ - && pie install --skip-enable-extension php-amqp/php-amqp:$PHP_AMQP_VERSION \ - && pie install --skip-enable-extension phpredis/phpredis:$PHP_REDIS_VERSION --enable-redis-igbinary \ - && docker-php-ext-enable --ini-name docker-php-ext-zz-custom.ini \ - event \ - igbinary \ - redis \ - amqp \ + "event-$PHP_EVENT_VERSION" \ + "igbinary-$PHP_IGBINARY_VERSION" \ + "redis-$PHP_REDIS_VERSION" \ + "amqp-$PHP_AMQP_VERSION" \ && cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \ - # Purge packages that where only needed for building php extensions - && apt-get purge --assume-yes \ - $PHPIZE_DEPS \ - libicu-dev \ - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - libzip-dev \ - libevent-dev \ - libssl-dev \ - libxml2-dev \ - libpq-dev \ - librabbitmq-dev \ - libxslt1-dev \ && mkdir -p \ $XDG_CONFIG_HOME \ $XDG_DATA_HOME \ @@ -139,52 +61,39 @@ RUN apt-get update \ COPY files/general / +FROM composer:2.10.1 AS composer + FROM runtime AS builder ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive -# Latest version of Phive: https://api.github.com/repos/phar-io/phive/releases/latest -ARG PHIVE_VERSION=0.16.0 -# Latest version of Composer: https://getcomposer.org/download -ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ - # Needed for xdebug extension configuration - $PHPIZE_DEPS \ vim \ git \ sqlite3 \ wait-for-it \ p7zip-full \ - # Needed for phive: - gnupg \ - # Install Phive - && curl -fsSLo /usr/local/bin/phive "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar" \ - && curl -fsSLo /tmp/phive.phar.asc "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar.asc" \ - && gpg --keyserver keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 \ - && gpg --verify /tmp/phive.phar.asc /usr/local/bin/phive \ - && chmod +x /usr/local/bin/phive \ - && phive update-repository-list \ - # Install Composer using Phive - && phive install --global composer:$COMPOSER_VERSION --trust-gpg-keys CBB3D576F2A0946F \ - && rm -rf /root/.phive \ + unzip \ + curl \ # Download Composer keys && mkdir -p "$XDG_CONFIG_HOME/composer" \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.dev.pub" https://composer.github.io/snapshots.pub \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.tags.pub" https://composer.github.io/releases.pub \ && chmod 644 "$XDG_CONFIG_HOME/composer/keys.dev.pub" "$XDG_CONFIG_HOME/composer/keys.tags.pub" \ # Install Xdebug and pcov PHP extensions - && pie install xdebug/xdebug:$XDEBUG_VERSION \ - && pie install pecl/pcov:$PCOV_VERSION \ + && install-php-extensions \ + "xdebug-$XDEBUG_VERSION" \ + "pcov-$PCOV_VERSION" \ && cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \ # Cleanup - && apt-get purge --assume-yes $PHPIZE_DEPS \ && apt-get autoremove --assume-yes \ && apt-get clean --assume-yes \ && rm -rf /var/lib/apt/lists/* \ @@ -216,7 +125,7 @@ RUN curl -fsSLo /tmp/fixuid.tar.gz "https://github.com/boxboat/fixuid/releases/d /etc/fixuid \ "/data" \ "/config" \ - "/cache" \ + "/cache/npm" \ && chown -R "$USER_UID":"$USER_GID" \ "/data" \ "/config" \ @@ -233,35 +142,26 @@ paths: EOF +COPY --from=composer /usr/bin/composer /usr/bin/composer + +FROM node:24.16.0-trixie-slim AS node + FROM builder AS builder_nodejs -ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 ENV npm_config_cache="$XDG_CACHE_HOME/npm" -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# Latest version of Node.js: https://nodejs.org -ARG NODE_MAJOR=24 +COPY --from=node /usr/local/bin/node /usr/local/bin/node +COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules RUN apt-get update \ && apt-get install --assume-yes --no-install-recommends \ gcc \ g++ \ make \ - && mkdir -p /usr/share/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \ - && chmod 644 /usr/share/keyrings/nodesource.gpg \ - && echo "deb [arch=$TARGETARCH signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && apt-get update \ - && apt-get install --assume-yes --no-install-recommends \ - nodejs \ - && npm uninstall --global npm \ + && ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \ && corepack install --global npm@11.x yarn@4.x pnpm@10.x \ && corepack enable npm yarn pnpm \ # Cleanup diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 841e5c8..593939b 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -16,7 +16,7 @@ ARG XDG_CACHE_HOME=/cache ENV XDG_CACHE_HOME=$XDG_CACHE_HOME # Latest version of event-extension: https://packagist.org/packages/osmanov/pecl-event -ARG PHP_EVENT_VERSION=3.1.5 +ARG PHP_EVENT_VERSION=3.1.4 # Latest version of igbinary-extension: https://packagist.org/packages/igbinary/igbinary ARG PHP_IGBINARY_VERSION=3.2.17RC1 # Latest version of redis-extension: https://packagist.org/packages/phpredis/phpredis @@ -24,72 +24,15 @@ ARG PHP_REDIS_VERSION=6.3.0 # Latest version of amqp-extension: https://packagist.org/packages/php-amqp/php-amqp ARG PHP_AMQP_VERSION=2.2.0 -ENV SMTPHOST=mail -ENV SMTPEHLO=localhost - WORKDIR /var/www -# Latest version of Pie: https://github.com/php/pie/releases -COPY --from=ghcr.io/php/pie:1.4.5-bin /pie /usr/bin/pie - -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ apt-transport-https \ ca-certificates \ openssl \ - curl \ - msmtp-mta \ - unzip \ - # Dependency of the PHP intl-extension - libicu76 \ - # Dependency of the PHP gd-extension - libpng16-16t64 \ - libwebp7 \ - libjpeg62-turbo \ - libfreetype6 \ - # Dependency of PHP zip-extension - libzip5 \ - # Dependency of PHP event-extension - libevent-2.1-7t64 \ - libevent-openssl-2.1-7t64 \ - libevent-extra-2.1-7t64 \ - # Dependency of PHP pdo_pgsql-extension - libpq5 \ - # Dependency of PHP amqp-extension - librabbitmq4 \ - # Dependency of PHP xsl-extension - libxslt1.1 \ - # Install packages that are needed for building PHP extensions - && apt-get install --assume-yes --no-install-recommends \ - $PHPIZE_DEPS \ - # Dependency of the PHP intl-extension - libicu-dev \ - # Dependencies of PHP gd-extension - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - # Dependency of PHP zip-extension - libzip-dev \ - # Dependency of PHP event-extension - libevent-dev \ - libssl-dev \ - # Dependency of PHP soap-extension - libxml2-dev \ - # Dependency of PHP pdo_pgsql-extension - libpq-dev \ - # Dependency of PHP amqp-extension - librabbitmq-dev \ - # Dependency of PHP xsl-extension - libxslt1-dev \ - # Configure PHP gd-extension - && docker-php-ext-configure gd \ - --enable-gd \ - --with-jpeg \ - --with-freetype \ - --with-webp \ - # Install PHP extensions - && docker-php-ext-install -j "$(nproc --all)" \ + && install-php-extensions \ pdo_mysql \ pdo_pgsql \ intl \ @@ -99,33 +42,12 @@ RUN apt-get update \ zip \ soap \ xsl \ - # Dependency of PHP event-extension sockets \ - && pie install --skip-enable-extension osmanov/pecl-event:$PHP_EVENT_VERSION \ - && pie install --skip-enable-extension igbinary/igbinary:$PHP_IGBINARY_VERSION \ - && pie install --skip-enable-extension php-amqp/php-amqp:$PHP_AMQP_VERSION \ - && pie install --skip-enable-extension phpredis/phpredis:$PHP_REDIS_VERSION --enable-redis-igbinary \ - && docker-php-ext-enable --ini-name docker-php-ext-zz-custom.ini \ - event \ - igbinary \ - redis \ - amqp \ + "event-$PHP_EVENT_VERSION" \ + "igbinary-$PHP_IGBINARY_VERSION" \ + "redis-$PHP_REDIS_VERSION" \ + "amqp-$PHP_AMQP_VERSION" \ && cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \ - # Purge packages that where only needed for building php extensions - && apt-get purge --assume-yes \ - $PHPIZE_DEPS \ - libicu-dev \ - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - libzip-dev \ - libevent-dev \ - libssl-dev \ - libxml2-dev \ - libpq-dev \ - librabbitmq-dev \ - libxslt1-dev \ && mkdir -p \ $XDG_CONFIG_HOME \ $XDG_DATA_HOME \ @@ -139,52 +61,39 @@ RUN apt-get update \ COPY files/general / +FROM composer:2.10.1 AS composer + FROM runtime AS builder ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive -# Latest version of Phive: https://api.github.com/repos/phar-io/phive/releases/latest -ARG PHIVE_VERSION=0.16.0 -# Latest version of Composer: https://getcomposer.org/download -ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ - # Needed for xdebug extension configuration - $PHPIZE_DEPS \ vim \ git \ sqlite3 \ wait-for-it \ p7zip-full \ - # Needed for phive: - gnupg \ - # Install Phive - && curl -fsSLo /usr/local/bin/phive "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar" \ - && curl -fsSLo /tmp/phive.phar.asc "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar.asc" \ - && gpg --keyserver keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 \ - && gpg --verify /tmp/phive.phar.asc /usr/local/bin/phive \ - && chmod +x /usr/local/bin/phive \ - && phive update-repository-list \ - # Install Composer using Phive - && phive install --global composer:$COMPOSER_VERSION --trust-gpg-keys CBB3D576F2A0946F \ - && rm -rf /root/.phive \ + unzip \ + curl \ # Download Composer keys && mkdir -p "$XDG_CONFIG_HOME/composer" \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.dev.pub" https://composer.github.io/snapshots.pub \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.tags.pub" https://composer.github.io/releases.pub \ && chmod 644 "$XDG_CONFIG_HOME/composer/keys.dev.pub" "$XDG_CONFIG_HOME/composer/keys.tags.pub" \ # Install Xdebug and pcov PHP extensions - && pie install xdebug/xdebug:$XDEBUG_VERSION \ - && pie install pecl/pcov:$PCOV_VERSION \ + && install-php-extensions \ + "xdebug-$XDEBUG_VERSION" \ + "pcov-$PCOV_VERSION" \ && cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \ # Cleanup - && apt-get purge --assume-yes $PHPIZE_DEPS \ && apt-get autoremove --assume-yes \ && apt-get clean --assume-yes \ && rm -rf /var/lib/apt/lists/* \ @@ -233,35 +142,26 @@ paths: EOF +COPY --from=composer /usr/bin/composer /usr/bin/composer + +FROM node:24.16.0-trixie-slim AS node + FROM builder AS builder_nodejs -ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 ENV npm_config_cache="$XDG_CACHE_HOME/npm" -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# Latest version of Node.js: https://nodejs.org -ARG NODE_MAJOR=24 +COPY --from=node /usr/local/bin/node /usr/local/bin/node +COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules RUN apt-get update \ && apt-get install --assume-yes --no-install-recommends \ gcc \ g++ \ make \ - && mkdir -p /usr/share/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \ - && chmod 644 /usr/share/keyrings/nodesource.gpg \ - && echo "deb [arch=$TARGETARCH signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && apt-get update \ - && apt-get install --assume-yes --no-install-recommends \ - nodejs \ - && npm uninstall --global npm \ + && ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \ && corepack install --global npm@11.x yarn@4.x pnpm@10.x \ && corepack enable npm yarn pnpm \ # Cleanup diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index 16dcbc6..6036232 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -16,7 +16,7 @@ ARG XDG_CACHE_HOME=/cache ENV XDG_CACHE_HOME=$XDG_CACHE_HOME # Latest version of event-extension: https://packagist.org/packages/osmanov/pecl-event -ARG PHP_EVENT_VERSION=3.1.5 +ARG PHP_EVENT_VERSION=3.1.4 # Latest version of igbinary-extension: https://packagist.org/packages/igbinary/igbinary ARG PHP_IGBINARY_VERSION=3.2.17RC1 # Latest version of redis-extension: https://packagist.org/packages/phpredis/phpredis @@ -24,76 +24,19 @@ ARG PHP_REDIS_VERSION=6.3.0 # Latest version of amqp-extension: https://packagist.org/packages/php-amqp/php-amqp ARG PHP_AMQP_VERSION=2.2.0 -ENV SMTPHOST=mail -ENV SMTPEHLO=localhost - # Default to classic mode (no workers). To enable worker mode, set: # FRANKENPHP_CONFIG="worker /var/www/public/index.php" ENV FRANKENPHP_CONFIG="" WORKDIR /var/www -# Latest version of Pie: https://github.com/php/pie/releases -COPY --from=ghcr.io/php/pie:1.4.5-bin /pie /usr/bin/pie - -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ apt-transport-https \ ca-certificates \ openssl \ - curl \ - msmtp-mta \ - unzip \ - # Dependency of the PHP intl-extension - libicu76 \ - # Dependency of the PHP gd-extension - libpng16-16t64 \ - libwebp7 \ - libjpeg62-turbo \ - libfreetype6 \ - # Dependency of PHP zip-extension - libzip5 \ - # Dependency of PHP event-extension - libevent-2.1-7t64 \ - libevent-openssl-2.1-7t64 \ - libevent-extra-2.1-7t64 \ - # Dependency of PHP pdo_pgsql-extension - libpq5 \ - # Dependency of PHP amqp-extension - librabbitmq4 \ - # Dependency of PHP xsl-extension - libxslt1.1 \ - # Install packages that are needed for building PHP extensions - && apt-get install --assume-yes --no-install-recommends \ - $PHPIZE_DEPS \ - # Dependency of the PHP intl-extension - libicu-dev \ - # Dependencies of PHP gd-extension - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - # Dependency of PHP zip-extension - libzip-dev \ - # Dependency of PHP event-extension - libevent-dev \ - libssl-dev \ - # Dependency of PHP soap-extension - libxml2-dev \ - # Dependency of PHP pdo_pgsql-extension - libpq-dev \ - # Dependency of PHP amqp-extension - librabbitmq-dev \ - # Dependency of PHP xsl-extension - libxslt1-dev \ - # Configure PHP gd-extension - && docker-php-ext-configure gd \ - --enable-gd \ - --with-jpeg \ - --with-freetype \ - --with-webp \ - # Install PHP extensions - && docker-php-ext-install -j "$(nproc --all)" \ + && install-php-extensions \ pdo_mysql \ pdo_pgsql \ intl \ @@ -103,33 +46,12 @@ RUN apt-get update \ zip \ soap \ xsl \ - # Dependency of PHP event-extension sockets \ - && pie install --skip-enable-extension osmanov/pecl-event:$PHP_EVENT_VERSION \ - && pie install --skip-enable-extension igbinary/igbinary:$PHP_IGBINARY_VERSION \ - && pie install --skip-enable-extension php-amqp/php-amqp:$PHP_AMQP_VERSION \ - && pie install --skip-enable-extension phpredis/phpredis:$PHP_REDIS_VERSION --enable-redis-igbinary \ - && docker-php-ext-enable --ini-name docker-php-ext-zz-custom.ini \ - event \ - igbinary \ - redis \ - amqp \ + "event-$PHP_EVENT_VERSION" \ + "igbinary-$PHP_IGBINARY_VERSION" \ + "redis-$PHP_REDIS_VERSION" \ + "amqp-$PHP_AMQP_VERSION" \ && cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \ - # Purge packages that where only needed for building php extensions - && apt-get purge --assume-yes \ - $PHPIZE_DEPS \ - libicu-dev \ - libpng-dev \ - libwebp-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - libzip-dev \ - libevent-dev \ - libssl-dev \ - libxml2-dev \ - libpq-dev \ - librabbitmq-dev \ - libxslt1-dev \ && mkdir -p \ $XDG_CONFIG_HOME \ $XDG_DATA_HOME \ @@ -144,52 +66,39 @@ RUN apt-get update \ COPY files/general / COPY files/frankenphp / +FROM composer:2.10.1 AS composer + FROM runtime AS builder ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive -# Latest version of Phive: https://api.github.com/repos/phar-io/phive/releases/latest -ARG PHIVE_VERSION=0.16.0 -# Latest version of Composer: https://getcomposer.org/download -ARG COMPOSER_VERSION=2.10.1 # Latest version of Xdebug: https://packagist.org/packages/xdebug/xdebug ARG XDEBUG_VERSION=3.5.3 # Latest version of pcov: https://packagist.org/packages/pecl/pcov ARG PCOV_VERSION=1.0.12 -RUN apt-get update \ +RUN --mount=type=bind,from=mlocati/php-extension-installer:2.11.9,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \ + apt-get update \ && apt-get install --assume-yes --no-install-recommends \ - # Needed for xdebug extension configuration - $PHPIZE_DEPS \ vim \ git \ sqlite3 \ wait-for-it \ p7zip-full \ - # Needed for phive: - gnupg \ - # Install Phive - && curl -fsSLo /usr/local/bin/phive "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar" \ - && curl -fsSLo /tmp/phive.phar.asc "https://github.com/phar-io/phive/releases/download/$PHIVE_VERSION/phive-$PHIVE_VERSION.phar.asc" \ - && gpg --keyserver keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 \ - && gpg --verify /tmp/phive.phar.asc /usr/local/bin/phive \ - && chmod +x /usr/local/bin/phive \ - && phive update-repository-list \ - # Install Composer using Phive - && phive install --global composer:$COMPOSER_VERSION --trust-gpg-keys CBB3D576F2A0946F \ - && rm -rf /root/.phive \ + unzip \ + curl \ # Download Composer keys && mkdir -p "$XDG_CONFIG_HOME/composer" \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.dev.pub" https://composer.github.io/snapshots.pub \ && curl -fsSLo "$XDG_CONFIG_HOME/composer/keys.tags.pub" https://composer.github.io/releases.pub \ && chmod 644 "$XDG_CONFIG_HOME/composer/keys.dev.pub" "$XDG_CONFIG_HOME/composer/keys.tags.pub" \ # Install Xdebug and pcov PHP extensions - && pie install xdebug/xdebug:$XDEBUG_VERSION \ - && pie install pecl/pcov:$PCOV_VERSION \ + && install-php-extensions \ + "xdebug-$XDEBUG_VERSION" \ + "pcov-$PCOV_VERSION" \ && cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \ # Cleanup - && apt-get purge --assume-yes $PHPIZE_DEPS \ && apt-get autoremove --assume-yes \ && apt-get clean --assume-yes \ && rm -rf /var/lib/apt/lists/* \ @@ -221,7 +130,7 @@ RUN curl -fsSLo /tmp/fixuid.tar.gz "https://github.com/boxboat/fixuid/releases/d /etc/fixuid \ "/data" \ "/config" \ - "/cache" \ + "/cache/npm" \ && chown -R "$USER_UID":"$USER_GID" \ "/data" \ "/config" \ @@ -238,35 +147,26 @@ paths: EOF +COPY --from=composer /usr/bin/composer /usr/bin/composer + +FROM node:24.16.0-trixie-slim AS node + FROM builder AS builder_nodejs -ARG TARGETARCH ARG DEBIAN_FRONTEND=noninteractive ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 ENV npm_config_cache="$XDG_CACHE_HOME/npm" -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# Latest version of Node.js: https://nodejs.org -ARG NODE_MAJOR=24 +COPY --from=node /usr/local/bin/node /usr/local/bin/node +COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules RUN apt-get update \ && apt-get install --assume-yes --no-install-recommends \ gcc \ g++ \ make \ - && mkdir -p /usr/share/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \ - && chmod 644 /usr/share/keyrings/nodesource.gpg \ - && echo "deb [arch=$TARGETARCH signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ - && echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null \ - && apt-get update \ - && apt-get install --assume-yes --no-install-recommends \ - nodejs \ - && npm uninstall --global npm \ + && ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \ && corepack install --global npm@11.x yarn@4.x pnpm@10.x \ && corepack enable npm yarn pnpm \ # Cleanup From 2df19e6d344c0be5fff8aac2627292c9644772ff Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sun, 14 Jun 2026 01:41:57 +0200 Subject: [PATCH 5/5] Updated DOCKER_OWNER to specsnl for locally generated images --- Taskfile.dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.dist.yml b/Taskfile.dist.yml index 05995df..b9e3fa5 100644 --- a/Taskfile.dist.yml +++ b/Taskfile.dist.yml @@ -2,7 +2,7 @@ version: "3" vars: DOCKER_REPO: ghcr.io - DOCKER_OWNER: ilyes512 + DOCKER_OWNER: specsnl # Latatest version of Hadolint: https://hub.docker.com/r/hadolint/hadolint/tags or https://github.com/hadolint/hadolint/releases HADOLINT_TAG_VERSION: v2.14.0