Description
Revisions and Commits
rDPHPCLI nasqueron/php-cli Docker image | |||
D2959 | rDPHPCLI4ff2dabfe1b1 Enable intl extension | ||
rDPHPFPM Docker image for Nginx, php-fpm | |||
D2958 | rDPHPFPM7e364ecbd107 Install intl extension |
Related Objects
Event Timeline
For shellserver and devserver role, the intl extension is already installed, per bdd61c48. MediaWiki is quoted as example of application using it.
Debian images will lag too much, review https://icu.unicode.org/download, we're at 71, Debian Bullseye is stuck at 67.
Let's build it.
"Fun" fact: libxml requires libicu, and pulls the system one of course:
#0 515.4 /usr/bin/ld: warning: libicuuc.so.67, needed by /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libxml2.so, may conflict with libicuuc.so.71 #0 515.4 /usr/bin/ld: warning: libicuuc.so.67, needed by /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libxml2.so, may conflict with libicuuc.so.71 #0 515.4 /usr/bin/ld: warning: libicuuc.so.67, needed by /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libxml2.so, may conflict with libicuuc.so.71
So if we want a custom libicu, we're stuck with setting LD_LIBRARY_PATH.
And even with that:
#0 516.4 Generating phar.php #0 516.5 /usr/src/php/sapi/cli/php: error while loading shared libraries: libicudata.so.71: cannot open shared object file: No such file or directory #0 516.5 make: *** [Makefile:468: ext/phar/phar.php] Error 127 `
The library path used was /usr/local/lib/icu.
We can't use more recent Sid packages, they depends of more recent version of other libs.
If someone wants to revisit issue:
&& wget -O /usr/src/libicu.tar.gz https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz \ && wget -O /usr/src/libicu.tar.gz.asc https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz.asc \ && gpg --verify /usr/src/libicu.tar.gz.asc \ && mkdir /usr/src/libicu \ && cd /usr/src/libicu \ && tar xzf ../libicu.tar.gz --strip-components=1 \ && cd source && ./configure --prefix=/usr/local && make && make install \
For now, back to icu 67.
So if someone needs more recent ICU, the cleaner way would be a custom Bullseye build of the icu source package. We'll include it in packages.nasqueron.org, and from there, the repository can then be used in the image both for libxml2 and PHP itself.
The nasqueron/notifications image took from D2958, so we're done:
$ docker exec -it notifications php -i | grep ICU ICU version => 67.1 ICU Data version => 67.1 ICU Unicode version => 13.0 […]