From 7696b46276385ab161fbd9162bd761dc388567a0 Mon Sep 17 00:00:00 2001 From: Arunesh Date: Fri, 13 Nov 2026 13:33:03 +0100 Subject: [PATCH] ci: speed up 8.5 image builds and move them to Blacksmith runners - Drop the unused grpc extension from 8.5 and 8.5-www (apps export OTLP over HTTP) - Install PHP extensions before libvips so a libvips bump keeps the cached extension layer - Run the build jobs on Blacksmith runners --- .github/workflows/build-and-push.yml | 6 +++--- 8.5-frankenphp/Dockerfile | 6 +++--- 8.5-www/Dockerfile | 2 +- 8.5-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini | 2 -- 8.5/Dockerfile | 8 ++++---- 8.5/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini | 2 -- 6 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 8.5-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini delete mode 100644 8.5/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index d51508d..341640c 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -20,7 +20,7 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' - runs-on: ubuntu-24.04 + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout uses: actions/checkout@v7 @@ -63,7 +63,7 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' - runs-on: ubuntu-24.04-arm + runs-on: blacksmith-4vcpu-ubuntu-2404-arm steps: - name: Checkout uses: actions/checkout@v7 @@ -108,7 +108,7 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' - runs-on: ubuntu-24.04 + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: Checkout uses: actions/checkout@v7 diff --git a/8.5-frankenphp/Dockerfile b/8.5-frankenphp/Dockerfile index 6ca2a9c..5ebc08a 100644 --- a/8.5-frankenphp/Dockerfile +++ b/8.5-frankenphp/Dockerfile @@ -31,6 +31,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libnss3-tools \ && rm -rf /var/lib/apt/lists/* +# Install PHP extensions +RUN set -eux; install-php-extensions $EXTENSIONS + # Install latest libvips # @see https://github.com/dooman87/imagemagick-docker/blob/main/Dockerfile.bookworm ARG VIPS_VERSION=8.18.7 @@ -40,9 +43,6 @@ ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" COPY --chmod=755 scripts/install-libvips.sh /tmp/install-libvips.sh RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh -# Install PHP extensions -RUN set -eux; install-php-extensions $EXTENSIONS - # Keep frequently changing binaries and startup code after dependency installation. COPY --from=composer/composer:2-bin /composer /usr/bin/composer COPY --link --chmod=755 ./8.5-frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint diff --git a/8.5-www/Dockerfile b/8.5-www/Dockerfile index 1a06a4b..62c99ba 100644 --- a/8.5-www/Dockerfile +++ b/8.5-www/Dockerfile @@ -41,7 +41,7 @@ ENV PORT=$PORT SERVER_NAME=":80, :$PORT" ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" -ENV EXTENSIONS="amqp apcu ast bcmath exif gd gettext gmp igbinary imagick intl opcache pcntl redis mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +ENV EXTENSIONS="amqp apcu ast bcmath exif gd gettext gmp igbinary imagick intl opcache pcntl redis mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app diff --git a/8.5-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.5-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini deleted file mode 100644 index e702d30..0000000 --- a/8.5-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini +++ /dev/null @@ -1,2 +0,0 @@ -grpc.enable_fork_support = 1 -grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.5/Dockerfile b/8.5/Dockerfile index 89cde10..ac2b6ad 100644 --- a/8.5/Dockerfile +++ b/8.5/Dockerfile @@ -27,7 +27,7 @@ ENV PUBLIC_DIR=$PUBLIC_DIR ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" -ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app @@ -55,6 +55,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ pngquant \ && rm -rf /var/lib/apt/lists/* +# Install PHP extensions +RUN set -eux; install-php-extensions $EXTENSIONS + # Install latest libvips # @see https://github.com/dooman87/imagemagick-docker/blob/main/Dockerfile.bookworm ARG VIPS_VERSION=8.18.7 @@ -64,9 +67,6 @@ ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" COPY --chmod=755 scripts/install-libvips.sh /tmp/install-libvips.sh RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh -# Install PHP extensions -RUN set -eux; install-php-extensions $EXTENSIONS - # Keep frequently changing binaries after dependency installation. COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy COPY --from=composer/composer:2-bin /composer /usr/bin/composer diff --git a/8.5/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.5/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini deleted file mode 100644 index e702d30..0000000 --- a/8.5/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini +++ /dev/null @@ -1,2 +0,0 @@ -grpc.enable_fork_support = 1 -grpc.poll_strategy = epoll1 \ No newline at end of file