From 5c73214700479efdb0c60178e7fa949a1eaa5189 Mon Sep 17 00:00:00 2001 From: SilverFire - Dmytro Naumenko Date: Mon, 23 Nov 2026 11:05:03 +0200 Subject: [PATCH 1/2] HQD-778: Add PHP 8.6 images Copy of the 8.5 fpm-alpine and cli-alpine images on top of the official php:8.6 Alpine images (PHP 8.6.0 GA). Merging also rebuilds every image from 8.2 up, since a push to master builds all supported versions. Co-Authored-By: Claude Opus 5.5 --- src/8.6/Makefile | 12 ++ src/8.6/cli-alpine/Dockerfile | 154 ++++++++++++++++ src/8.6/fpm-alpine/Dockerfile | 193 ++++++++++++++++++++ src/8.6/fpm-alpine/hiqdev-docker-entrypoint | 82 +++++++++ 4 files changed, 441 insertions(+) create mode 100644 src/8.6/Makefile create mode 100644 src/8.6/cli-alpine/Dockerfile create mode 100644 src/8.6/fpm-alpine/Dockerfile create mode 100755 src/8.6/fpm-alpine/hiqdev-docker-entrypoint diff --git a/src/8.6/Makefile b/src/8.6/Makefile new file mode 100644 index 0000000..2f7f40d --- /dev/null +++ b/src/8.6/Makefile @@ -0,0 +1,12 @@ +VERSION = 8.6 + +builds = fpm-alpine cli-alpine + +all: $(builds) push_$(builds) + +$(builds): + echo "🔧 Building PHP image for $@" + docker build -t hiqdev/php:$(VERSION)-$@ $@ + docker push hiqdev/php:$(VERSION)-$@ + +.PHONY: all $(builds) push_$(builds) diff --git a/src/8.6/cli-alpine/Dockerfile b/src/8.6/cli-alpine/Dockerfile new file mode 100644 index 0000000..55af184 --- /dev/null +++ b/src/8.6/cli-alpine/Dockerfile @@ -0,0 +1,154 @@ +FROM php:8.6-cli-alpine + +COPY --from=ghcr.io/php/pie:1.5.3-bin /pie /usr/local/bin/pie + +ENV POSTFIX_MAILNAME=hiqdev.com +ENV XDEBUG_RELEASE=3.5.1 +ENV MEMCACHED_RELEASE=3.4.0 +ENV PECL_SSH2_RELEASE=1.5.0 +ENV GNU_LIBICONV_RELEASE=1.18-r0 + +# PHP options +ENV PHP_MAX_EXECUTION_TIME=3000 +ENV PHP_MAX_INPUT_VARS=20000 +ENV PHP_ERROR_REPORTING="E_ALL & ~E_NOTICE" +ENV PHP_POST_MAX_SIZE=60M +ENV PHP_UPLOAD_MAX_FILESIZE=25M +ENV PHP_SESS_GC_MAXLIFETIME=2592000 + +RUN --mount=type=secret,id=github_token \ + set -xe \ + # PIE downloads extension sources from GitHub; authenticate to avoid anonymous rate limits. + # Tracing is off while the token is read so that it never lands in build logs. + && { set +x; if [ -r /run/secrets/github_token ]; then export COMPOSER_AUTH="{\"github-oauth\":{\"github.com\":\"$(cat /run/secrets/github_token)\"}}"; fi; set -x; } \ + && apk update \ + && apk add --no-cache --virtual .php-deps \ + imagemagick \ + ghostscript \ + make \ + libssh2 \ + icu \ + gmp-dev \ + librdkafka-dev \ + libpq-dev \ + libzip-dev \ + libxml2-dev \ + libmemcached-dev \ + imap-dev \ + libgomp \ + && apk add --no-cache --virtual .tools \ + openssh-client \ + git \ + iproute2 \ + bind-tools \ + gnupg \ + unzip \ + bash \ + postgresql-client \ + postfix \ + && apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + zlib-dev \ + icu-dev \ + g++ \ + freetype-dev \ + libpng-dev \ + imagemagick-dev \ + libjpeg-turbo-dev \ + ghc \ + autoconf \ + krb5-dev \ + libssh2-dev \ + zlib-dev \ + patch \ + && \ + docker-php-ext-configure intl && \ + docker-php-ext-install intl && \ + docker-php-ext-enable intl && \ + + pecl install imap && \ + pie install pecl/mailparse && \ + docker-php-ext-install zip bcmath soap pcntl gmp && \ + docker-php-ext-enable imap && \ + + pie install imagick/imagick && \ + + # SSH + pecl install ssh2-$PECL_SSH2_RELEASE && \ + docker-php-ext-enable ssh2 && \ + + # GD + export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \ + docker-php-ext-configure gd --with-freetype --with-jpeg && \ + docker-php-ext-install gd && \ + + # PostgreSQL + docker-php-ext-install pdo_pgsql pgsql && \ + + # XDebug + pie install "xdebug/xdebug:$XDEBUG_RELEASE" \ + + && pie install rdkafka/rdkafka \ + + # Memcached + && pie install "php-memcached/php-memcached:$MEMCACHED_RELEASE" \ + + # MongoDB + && pie install mongodb/mongodb-extension \ + + # Sockets + && docker-php-ext-install sockets \ + + && apk add gnu-libiconv="$GNU_LIBICONV_RELEASE" --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/latest-stable/community/ --allow-untrusted \ + + && { find /usr/local/lib -type f -print0 | xargs -0r strip --strip-all -p 2>/dev/null || true; } \ + && apk del .build-deps \ + && rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apk/* \ + +ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so + +# General settings +RUN { \ + echo "memory_limit=256M"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-general.ini \ + + # Disable Git safe directory check + && git config --global --add safe.directory '*' \ + + && { \ + echo "opcache.enable=1"; \ + echo "opcache.memory_consumption=1024"; \ + echo "opcache.max_accelerated_files=9000"; \ + echo "opcache_revalidate_freq=120"; \ + echo "opcache.interned_strings_buffer=16"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \ + + # Disable XDebug by default + && sed -i "1s/^/;/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ + && { \ + echo "xdebug.max_nesting_level=500"; \ + echo "xdebug.mode=debug"; \ + echo "xdebug.client_host=127.0.0.1"; \ + echo "xdebug.client_port=9003"; \ + echo "xdebug.start_with_request=trigger"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ + && \ + { \ + echo "log_errors = On"; \ + echo "max_execution_time = $PHP_MAX_EXECUTION_TIME"; \ + echo "max_input_vars = $PHP_MAX_INPUT_VARS"; \ + echo "error_reporting = $PHP_ERROR_REPORTING"; \ + echo "post_max_size = $PHP_POST_MAX_SIZE"; \ + echo "upload_max_filesize = $PHP_UPLOAD_MAX_FILESIZE"; \ + echo "session.gc_maxlifetime = $PHP_SESS_GC_MAXLIFETIME"; \ + echo "mail.add_x_header = Off"; \ + } | tee -a /usr/local/etc/php/php.ini + +# Composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +# FreeCDB +COPY --from=hiqdev/freecdb /usr/bin/cdbmake /usr/bin/cdbdump /usr/bin/cdbget /usr/bin/cdbstats /usr/bin/ + +RUN mkdir /app +WORKDIR /app diff --git a/src/8.6/fpm-alpine/Dockerfile b/src/8.6/fpm-alpine/Dockerfile new file mode 100644 index 0000000..4395453 --- /dev/null +++ b/src/8.6/fpm-alpine/Dockerfile @@ -0,0 +1,193 @@ +FROM php:8.6-fpm-alpine + +COPY --from=ghcr.io/php/pie:1.5.3-bin /pie /usr/local/bin/pie + +ENV POSTFIX_MAILNAME=hiqdev.com +ENV XDEBUG_RELEASE=3.5.1 +ENV MEMCACHED_RELEASE=3.4.0 +ENV NEW_RELIC_AGENT_VERSION=12.6.0.34 +ENV PECL_SSH2_RELEASE=1.5.0 +ENV GNU_LIBICONV_RELEASE=1.18-r0 + +# PHP-FPM options +ENV FPM_MAX_CHILDREN=300 +ENV FPM_START_SERVERS=50 +ENV FPM_MIN_SPARE_SERVERS=20 +ENV FPM_MAX_SPARE_SERVERS=50 +ENV FPM_MAX_REQUESTS=10000 +ENV FPM_PROCESS_MAX=512 + +# PHP Options +ENV PHP_MAX_EXECUTION_TIME=3000 +ENV PHP_MAX_INPUT_VARS=20000 +ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_NOTICE" +ENV PHP_POST_MAX_SIZE=60M +ENV PHP_UPLOAD_MAX_FILESIZE=25M +ENV PHP_SESS_GC_MAXLIFETIME=2592000 + +RUN --mount=type=secret,id=github_token \ + set -xe \ + # PIE downloads extension sources from GitHub; authenticate to avoid anonymous rate limits. + # Tracing is off while the token is read so that it never lands in build logs. + && { set +x; if [ -r /run/secrets/github_token ]; then export COMPOSER_AUTH="{\"github-oauth\":{\"github.com\":\"$(cat /run/secrets/github_token)\"}}"; fi; set -x; } \ + && apk update \ + && apk add --no-cache --virtual .php-deps \ + imagemagick \ + ghostscript \ + make \ + libssh2 \ + icu \ + gmp-dev \ + librdkafka-dev \ + libpq-dev \ + libzip-dev \ + libxml2-dev \ + libmemcached-dev \ + imap-dev \ + libgomp \ + && apk add --no-cache --virtual .tools \ + openssh-client \ + git \ + iproute2 \ + bind-tools \ + gnupg \ + unzip \ + bash \ + postgresql-client \ + postfix \ + && apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + zlib-dev \ + icu-dev \ + g++ \ + freetype-dev \ + libpng-dev \ + imagemagick-dev \ + libjpeg-turbo-dev \ + ghc \ + autoconf \ + krb5-dev \ + libssh2-dev \ + zlib-dev \ + patch \ + && \ + docker-php-ext-configure intl && \ + docker-php-ext-install intl && \ + docker-php-ext-enable intl && \ + + pecl install imap && \ + pie install pecl/mailparse && \ + docker-php-ext-install zip bcmath soap pcntl gmp && \ + docker-php-ext-enable imap && \ + + pie install imagick/imagick && \ + + # SSH + pecl install ssh2-$PECL_SSH2_RELEASE && \ + docker-php-ext-enable ssh2 && \ + + # GD + export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \ + docker-php-ext-configure gd --with-freetype --with-jpeg && \ + docker-php-ext-install gd && \ + + # PostgreSQL + docker-php-ext-install pdo_pgsql pgsql && \ + + # XDebug + pie install "xdebug/xdebug:$XDEBUG_RELEASE" \ + + && pie install rdkafka/rdkafka \ + + # Memcached + && pie install "php-memcached/php-memcached:$MEMCACHED_RELEASE" \ + + # Sockets + && docker-php-ext-install sockets \ + + # MongoDB + && pie install mongodb/mongodb-extension \ + + && apk add gnu-libiconv=$GNU_LIBICONV_RELEASE --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/latest-stable/community/ --allow-untrusted \ + + # New Relic + && curl -L https://download.newrelic.com/php_agent/archive/$NEW_RELIC_AGENT_VERSION/newrelic-php5-$NEW_RELIC_AGENT_VERSION-linux-musl.tar.gz | tar -C /tmp -zx \ + && NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 /tmp/newrelic-php5-$NEW_RELIC_AGENT_VERSION-linux-musl/newrelic-install install \ + && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ + + && { find /usr/local/lib -type f -print0 | xargs -0r strip --strip-all -p 2>/dev/null || true; } \ + && apk del .build-deps \ + && rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apk/* + +ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so + +# General settings +RUN { \ + echo "memory_limit=256M"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-general.ini \ + + # Disable Git safe directory check + && git config --global --add safe.directory '*' \ + + && { \ + echo "opcache.enable=1"; \ + echo "opcache.memory_consumption=1024"; \ + echo "opcache.max_accelerated_files=9000"; \ + echo "opcache_revalidate_freq=120"; \ + echo "opcache.interned_strings_buffer=16"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \ + + # Disable XDebug by default + && sed -i "1s/^/;/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ + && { \ + echo "xdebug.max_nesting_level=500"; \ + echo "xdebug.mode=debug"; \ + echo "xdebug.client_host=127.0.0.1"; \ + echo "xdebug.client_port=9003"; \ + echo "xdebug.start_with_request=trigger"; \ + } | tee -a /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \ + + # Tune configs + sed -i "s/max_children\s*=\s*[[:digit:]]\+/max_children = $FPM_MAX_CHILDREN/" /usr/local/etc/php-fpm.d/www.conf && \ + sed -i "s/start_servers\s*=\s*[[:digit:]]\+/start_servers = $FPM_START_SERVERS/" /usr/local/etc/php-fpm.d/www.conf && \ + sed -i "s/min_spare_servers\s*=\s*[[:digit:]]\+/min_spare_servers = $FPM_MIN_SPARE_SERVERS/" /usr/local/etc/php-fpm.d/www.conf && \ + sed -i "s/pm.max_spare_servers\s*=\s*[[:digit:]]\+/pm.max_spare_servers = $FPM_MAX_SPARE_SERVERS/" /usr/local/etc/php-fpm.d/www.conf && \ + + # FPM monitoring + sed -i "s/.*pm.status_path = .*$/pm.status_path = \/fpm_status/g" /usr/local/etc/php-fpm.d/www.conf && \ + sed -i "s/.*ping.path = .*$/ping.path = \/fpm_ping/g" /usr/local/etc/php-fpm.d/www.conf && \ + sed -i "s/.*ping.response = .*$/ping.response = pong/g" /usr/local/etc/php-fpm.d/www.conf && \ + { \ + echo '[www]'; \ + echo "pm.max_requests = $FPM_MAX_REQUESTS"; \ + echo 'catch_workers_output = yes'; \ + } | tee -a /usr/local/etc/php-fpm.d/www.conf && \ + { \ + echo '[global]'; \ + echo "process.max = $FPM_PROCESS_MAX"; \ + echo 'emergency_restart_threshold = 10'; \ + echo 'emergency_restart_interval = 2s'; \ + echo 'process_control_timeout = 10s'; \ + } | tee -a /usr/local/etc/php-fpm.conf && \ + { \ + echo "log_errors = On"; \ + echo "max_execution_time = $PHP_MAX_EXECUTION_TIME"; \ + echo "max_input_vars = $PHP_MAX_INPUT_VARS"; \ + echo "error_reporting = $PHP_ERROR_REPORTING"; \ + echo "post_max_size = $PHP_POST_MAX_SIZE"; \ + echo "upload_max_filesize = $PHP_UPLOAD_MAX_FILESIZE"; \ + echo "session.gc_maxlifetime = $PHP_SESS_GC_MAXLIFETIME"; \ + echo "mail.add_x_header = Off"; \ + } | tee -a /usr/local/etc/php/php.ini + +# Composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer +# FreeCDB +COPY --from=hiqdev/freecdb /usr/bin/cdbmake /usr/bin/cdbdump /usr/bin/cdbget /usr/bin/cdbstats /usr/bin/ + +RUN mkdir /app +WORKDIR /app + +COPY hiqdev-docker-entrypoint /usr/local/bin +ENTRYPOINT ["hiqdev-docker-entrypoint"] +CMD ["php-fpm"] diff --git a/src/8.6/fpm-alpine/hiqdev-docker-entrypoint b/src/8.6/fpm-alpine/hiqdev-docker-entrypoint new file mode 100755 index 0000000..c05be5f --- /dev/null +++ b/src/8.6/fpm-alpine/hiqdev-docker-entrypoint @@ -0,0 +1,82 @@ +#!/bin/bash +set -e + +# Update `myhostname` in Postfix in order to send emails +postconf -e myhostname=$(hostname) + +if [ -n "$NEW_RELIC_LICENSE_KEY" ]; then + echo '[ New Relic ] Enabled' + + sed -i 's/;extension/extension/' $(php -r "echo(PHP_CONFIG_FILE_SCAN_DIR);")/newrelic.ini + sed -i -e "s/REPLACE_WITH_REAL_KEY/$NEW_RELIC_LICENSE_KEY/" $(php -r "echo(PHP_CONFIG_FILE_SCAN_DIR);")/newrelic.ini + sed -i -e '$anewrelic.distributed_tracing_enabled=true' $(php -r "echo(PHP_CONFIG_FILE_SCAN_DIR);")/newrelic.ini + + if [ -n "$NEW_RELIC_DAEMON_ADDRESS" ]; then + echo "[ New Relic ] Daemon address set to $NEW_RELIC_DAEMON_ADDRESS:31339" + echo "newrelic.daemon.address=\"$NEW_RELIC_DAEMON_ADDRESS:31339\"" >> $(php -r "echo(PHP_CONFIG_FILE_SCAN_DIR);")/newrelic.ini + fi + if [ -n "$NEW_RELIC_APPNAME" ]; then + echo "[ New Relic ] App name set to $NEW_RELIC_APPNAME" + sed -i -e "s/newrelic.appname[[:space:]]=[[:space:]].*/newrelic.appname=\"$NEW_RELIC_APPNAME\"/" $(php -r "echo(PHP_CONFIG_FILE_SCAN_DIR);")/newrelic.ini + fi +fi + +if [ "$ENV" != "prod" ]; then + echo "Environment is set to DEV" + + # Disable Opcache + echo "[ opcache ] Configuring dev mode" + sed -i "s/opcache.revalidate_freq\s*=\s*[[:digit:]]\+/opcache.revalidate_freq=0/" /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini + + # Enable Blackfire + if [ "$PHP_BLACKFIRE_ENABLED" = "1" ]; then + echo "[ blackfire ] Enabling Blackfire" + sed -i "s/^;//" /usr/local/etc/php/conf.d/blackfire.ini + fi + + # Enable XDebug if not disabled explicitly + if [ "$PHP_XDEBUG_ENABLED" != "0" ]; then + echo "[ xdebug ] Enabled" + sed -i "1s/^;//" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + + if [ -z "$XDEBUG_CLIENT_HOST" ]; then + docker_host_ip=$( (dig +time=1 +tries=2 +short host.docker.internal | grep -v ';;' | head -1) || true ) + if [ "$docker_host_ip" != "" ]; then + # MacOS + XDEBUG_CLIENT_HOST=$docker_host_ip + else + # Linux + XDEBUG_CLIENT_HOST=$(ip route show | awk '/default/ {print $3}') + fi + fi + + if [ -n "$XDEBUG_CLIENT_HOST" ]; then + echo "[ xdebug ] Set client host to $XDEBUG_CLIENT_HOST" + sed -i "s/xdebug.client_host\s*=\s*.*/xdebug.client_host=$XDEBUG_CLIENT_HOST/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + fi + if [ -n "$XDEBUG_CLIENT_PORT" ]; then + echo "[ xdebug ] Set client port to $XDEBUG_CLIENT_PORT" + sed -i "s/xdebug.client_port\s*=\s*.*/xdebug.client_port=$XDEBUG_CLIENT_PORT/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + fi + if [ -n "$XDEBUG_START_WITH_REQUEST" ]; then + echo "[ xdebug ] Set xdebug.start_with_request to $XDEBUG_START_WITH_REQUEST" + sed -i "s/xdebug.start_with_request\s*=\s*.*/xdebug.start_with_request=$XDEBUG_START_WITH_REQUEST/" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + fi + fi +fi + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- php-fpm "$@" +fi + +# first arg is `sh` or `bash` +if [ "$1" = 'sh' ] || [ "$1" = 'bash' ]; then + # GitLab Says: + # To ensure a job can run, its Docker image must: + # - Provide sh or bash + # - Define an ENTRYPOINT that starts a shell when passed sh/bash as argument + set -- "$@" +fi + +exec "$@" From 449584c1f8a642dacee507bb8a7eefa9e9e0c694 Mon Sep 17 00:00:00 2001 From: SilverFire - Dmytro Naumenko Date: Mon, 23 Nov 2026 11:10:19 +0200 Subject: [PATCH 2/2] HQD-778: Install imap and ssh2 without pecl on PHP 8.6 The official php:8.6 images no longer ship pecl, so the 8.6 build failed at `pecl install imap`. imap: PECL imap 1.0.3 does not compile against PHP 8.6 (XtOffsetOf and INI_STR are gone); the fix is merged upstream but not released, and imap has no PIE package. Build it with docker-php-ext-install from the pinned upstream commit that carries the fix, with SSL support as in the 8.5 image. ssh2: install through PIE. 1.6.1 is the first release published as a PIE package. Co-Authored-By: Claude Opus 5.5 --- src/8.6/cli-alpine/Dockerfile | 12 +++++++----- src/8.6/fpm-alpine/Dockerfile | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/8.6/cli-alpine/Dockerfile b/src/8.6/cli-alpine/Dockerfile index 55af184..322898f 100644 --- a/src/8.6/cli-alpine/Dockerfile +++ b/src/8.6/cli-alpine/Dockerfile @@ -5,7 +5,8 @@ COPY --from=ghcr.io/php/pie:1.5.3-bin /pie /usr/local/bin/pie ENV POSTFIX_MAILNAME=hiqdev.com ENV XDEBUG_RELEASE=3.5.1 ENV MEMCACHED_RELEASE=3.4.0 -ENV PECL_SSH2_RELEASE=1.5.0 +ENV PECL_SSH2_RELEASE=1.6.1 +ENV IMAP_COMMIT=c441c79add125f5a01f88332805221edeebe47b0 ENV GNU_LIBICONV_RELEASE=1.18-r0 # PHP options @@ -66,16 +67,17 @@ RUN --mount=type=secret,id=github_token \ docker-php-ext-install intl && \ docker-php-ext-enable intl && \ - pecl install imap && \ + mkdir -p /usr/src/php/ext/imap && \ + curl -fsSL "https://github.com/php/pecl-mail-imap/archive/$IMAP_COMMIT.tar.gz" | tar -xz -C /usr/src/php/ext/imap --strip-components=1 && \ + docker-php-ext-configure imap --with-imap-ssl && \ + docker-php-ext-install imap && \ pie install pecl/mailparse && \ docker-php-ext-install zip bcmath soap pcntl gmp && \ - docker-php-ext-enable imap && \ pie install imagick/imagick && \ # SSH - pecl install ssh2-$PECL_SSH2_RELEASE && \ - docker-php-ext-enable ssh2 && \ + pie install "pecl/ssh2:$PECL_SSH2_RELEASE" && \ # GD export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \ diff --git a/src/8.6/fpm-alpine/Dockerfile b/src/8.6/fpm-alpine/Dockerfile index 4395453..2a34cff 100644 --- a/src/8.6/fpm-alpine/Dockerfile +++ b/src/8.6/fpm-alpine/Dockerfile @@ -6,7 +6,8 @@ ENV POSTFIX_MAILNAME=hiqdev.com ENV XDEBUG_RELEASE=3.5.1 ENV MEMCACHED_RELEASE=3.4.0 ENV NEW_RELIC_AGENT_VERSION=12.6.0.34 -ENV PECL_SSH2_RELEASE=1.5.0 +ENV PECL_SSH2_RELEASE=1.6.1 +ENV IMAP_COMMIT=c441c79add125f5a01f88332805221edeebe47b0 ENV GNU_LIBICONV_RELEASE=1.18-r0 # PHP-FPM options @@ -75,16 +76,17 @@ RUN --mount=type=secret,id=github_token \ docker-php-ext-install intl && \ docker-php-ext-enable intl && \ - pecl install imap && \ + mkdir -p /usr/src/php/ext/imap && \ + curl -fsSL "https://github.com/php/pecl-mail-imap/archive/$IMAP_COMMIT.tar.gz" | tar -xz -C /usr/src/php/ext/imap --strip-components=1 && \ + docker-php-ext-configure imap --with-imap-ssl && \ + docker-php-ext-install imap && \ pie install pecl/mailparse && \ docker-php-ext-install zip bcmath soap pcntl gmp && \ - docker-php-ext-enable imap && \ pie install imagick/imagick && \ # SSH - pecl install ssh2-$PECL_SSH2_RELEASE && \ - docker-php-ext-enable ssh2 && \ + pie install "pecl/ssh2:$PECL_SSH2_RELEASE" && \ # GD export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \