我正在尝试在我的 PHP 阿尔卑斯映像上安装/启用 PHP 扩展。
我的应用程序文件包含 ,因此是我的目标。composer.json"ext-http": "*"
我的泊坞文件(相关部分)如下所示:
# PHP-FPM Base Image
FROM php:7.2.26-fpm-alpine
# Install PHP extensions
RUN apk add --update --virtual .build-deps autoconf g++ make zlib-dev curl-dev \
&& pecl install raphf propro \
&& docker-php-ext-enable raphf propro \
&& pecl install pecl_http \
&& echo -e "extension=raphf.so\nextension=propro.so\nextension=http.so" > /usr/local/etc/php/conf.d/docker-php-ext-http.ini \
&& rm -rf /usr/local/etc/php/conf.d/docker-php-ext-raphf.ini \
&& rm -rf /usr/local/etc/php/conf.d/docker-php-ext-propro.ini \
&& apk del .build-deps \
&& rm -rf /tmp/*
但是,在运行时,我收到以下警告:composer update
PHP Warning: PHP Startup: Unable to load dynamic library 'http.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so: uidna_IDNToASCII: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20170718/http.so.so: No such file or directory)) in Unknown on line 0
之后,该命令将失败:composer update
The requested PHP extension ext-http * is missing from your system. Install or enable PHP's http extension.
警告的部分让我停顿,使我认为文件正在不正确的位置查找。http.so.so
我的参考是以下多克文件:https://hub.docker.com/r/realpaul/docker-php/dockerfile
有人可以帮我调试这个问题吗?谢谢!
MMTTMM