Closed Felipaorfr closed 4 months ago
That's really strange...
I launched a docker image with
docker run --rm -it php:7.1-apache bash
And I executed
$ echo $PHP_INI_DIR
/usr/local/etc/php
I don't know why in your case the PHP_INI_DIR
environment variable is not set.
Just so you know:
RUN pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug
whas also breaking with the same error. The fix was to change the version, for instance:
RUN pecl install xdebug-2.9.1 && docker-php-ext-enable xdebug
And it worked, but I messed around so much with this that php -v and phpinfo() shows version 2.9.8. That's really strange.
Version of install-php-extensions
latest
Error description
My Dockerfile:
The error I get: /usr/bin/install-php-extensions: 1830: /usr/bin/install-php-extensions: PHP_INI_DIR: parameter not set failed to solve: process "/bin/sh -c sudo install-php-extensions xdebug" did not complete successfully: exit code: 2
Error seems to be in this line 1830:
checkModuleWorking_iniFile="$PHP_INI_DIR/conf.d/docker-php-ext-$1--temp.ini"
Not sure what to do to fix this...
Docker image
php:7.1-apache
Minimal Dockerfile