docker-php-5.3-apache
docker-php-5.3-apache copied to clipboard
Can't install bcmath through docker-php-ext-install
When I try to install the module bcmath through docker-php-ext-install
I get the following error:
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
docker-php-ext-enable bcmath.so
/usr/local/bin/docker-php-ext-enable: line 61: /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini: No such file or directory
Do you have any advice how to fix it?
same issue when installing gd library
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files: /usr/local/include/php/
docker-php-ext-enable gd.so
/usr/local/bin/docker-php-ext-enable: line 61: /usr/local/etc/php/conf.d/docker-php-ext-gd.ini: No such file or directory
ERROR: Service 'app' failed to build: The command '/bin/sh -c docker-php-ext-install gd' returned a non-zero code: 1
PHP ini file path is broken in docker-php-ext-enable
.
https://github.com/eugeneware/docker-php-5.3-apache/blob/master/docker-php-ext-enable#L59
I fixed it with $PHP_INI_DIR
env.
ini="$PHP_INI_DIR/conf.d/docker-php-ext-$ext.ini"
You can copy a fixed script.
FROM eugeneware/php-5.3
COPY ./fixed-docker-php-ext-enable /usr/local/bin/docker-php-ext-enable
RUN docker-php-ext-install curl
PHP ini file path is broken in
docker-php-ext-enable
. https://github.com/eugeneware/docker-php-5.3-apache/blob/master/docker-php-ext-enable#L59I fixed it with
$PHP_INI_DIR
env.ini="$PHP_INI_DIR/conf.d/docker-php-ext-$ext.ini"
You can copy a fixed script.
FROM eugeneware/php-5.3 COPY ./fixed-docker-php-ext-enable /usr/local/bin/docker-php-ext-enable RUN docker-php-ext-install curl
you should post a PR with this. I also experimented this problem (installing another extension), and with your fix I solved it.