Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
env.variant == "zts" # only needed for ZTS builds
and is_alpine
and IN(rcVersion; "8.2")
;
def install_pear_pecl:
# https://github.com/docker-library/php/issues/1554
IN(rcVersion; "8.2", "8.3", "8.4", "8.5")
-}}
FROM {{ env.from }}

Expand Down Expand Up @@ -350,8 +354,10 @@ RUN set -eux; \
# https://github.com/docker-library/php/issues/822
--with-pic \
\
{{ if install_pear_pecl then ( -}}
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
--enable-mbstring \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The major justification to compile in mbstring was to support pecl installed packages that depend on it. Our line is to only include extensions that must be compiled into php itself versus what can be added after while following upstream recommendations. So, I agree with this change to drop mbstring in 8.6+.

If they still need it, users can add docker-php-ext-install mbstring in PHP 8.6 and above.

{{ ) else "" end -}}
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
--enable-mysqlnd \
# https://wiki.php.net/rfc/argon2_password_hash
Expand All @@ -377,9 +383,11 @@ RUN set -eux; \
--disable-phpdbg \
{{ ) end -}}
\
{{ if install_pear_pecl then ( -}}
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
--with-pear \
\
{{ ) else "" end -}}
{{ if rcVersion | IN("8.2") then ( -}}
# bundled pcre does not support JIT on riscv64 until 10.41 (php 8.3+)
# https://github.com/PCRE2Project/pcre2/commits/pcre2-10.41/src/sljit/sljitNativeRISCV_64.c
Expand Down Expand Up @@ -476,10 +484,12 @@ RUN set -eux; \
{{ clean_apt }}; \
{{ ) end -}}
\
{{ if install_pear_pecl then ( -}}
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
{{ ) else "" end -}}
# smoke test
php --version

Expand Down
Loading