php icon indicating copy to clipboard operation
php copied to clipboard

No preferable way to install custom extension that is not mentioned in default list.

Open ephrin opened this issue 11 years ago • 25 comments

1st problem: docker-php-ext-* does not provide a way to install extension package from pecl (for example i need to install ext-mongo which cause me to make some tricks with Dockerfile to succeed) 2nd problem: custom source extensions (e.g. phalcon) that has to be compiled from scratch and exposed to runnin php daemon (fpm, apache).

Is there any instructions to make it right and simple? For any of cases.

Thanks.

ephrin avatar Mar 26 '15 09:03 ephrin

''' RUN pecl install xdebug-beta &&
docker-php-ext-enable xdebug '''

ekandreas avatar Jan 06 '16 00:01 ekandreas

thank you @ekandreas :+1:

ab22593k avatar Jan 07 '16 06:01 ab22593k

This works great, thanks @luiscoms

# Enable and configure xdebug
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug

GuillaumeSeren avatar Mar 17 '16 08:03 GuillaumeSeren

Thanks for all the discussion and useful information! I'm closing since there's nothing to change in the image (given that the existing scripts handle this reasonably well), but this thread should serve as a useful reference for folks looking for help doing this kind of thing in the future. :+1:

tianon avatar Aug 29 '16 19:08 tianon

I have a project using old mongo extension which is deprecated . Unable to install by pecl. Got a error message "No releases for package "pecl/mongo" exist" when I tried to install mongo extension by running pecl install mongo I end up install mongo extension manually. Below is work for me. RUN apt-get update \ && apt-get -y install libssl-dev \ && curl -L -o /tmp/mongo.tar.gz https://github.com/mongodb/mongo-php-driver-legacy/archive/1.6.14.tar.gz \ && tar xfz /tmp/mongo.tar.gz -C /tmp/ \ && mkdir -p /usr/src/php/ext/mongo \ && mv /tmp/mongo-php-driver-legacy-1.6.14/* /usr/src/php/ext/mongo \ && rm -r /tmp/mongo.tar.gz /tmp/mongo-php-driver-legacy-1.6.14 \ && cd /usr/src/php/ext/mongo \ && phpize \ && ./configure \ && make all \ && docker-php-ext-install mongo\ && docker-php-ext-enable mongo\

ztwo79 avatar Oct 25 '16 03:10 ztwo79