我想在php image中添加事件扩展名,所以我将这两行添加到了Dockerfile中
pecl install event && \
docker-php-ext-enable event && \
我已经在Dockerfile中安装了libevent
(使用libevent-dev
)依赖项。
运行容器(docker run -it salamandermh/php-cli:7.1 bash
)时,它显示警告消息:PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/event.so' - Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20160303/event.so: php_sockets_le_socket: symbol not found in Unknown on line 0
似乎没有找到sockets
模块,但是我可以在sockets
中找到[PHP Modules]