php-fpm, workspace when php5 support old mongo ext. (#1642)
This commit is contained in:
parent
b71f50bf83
commit
08dfc9f816
@ -160,6 +160,10 @@ ARG INSTALL_MONGO=false
|
|||||||
|
|
||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
|
pecl install mongo && \
|
||||||
|
docker-php-ext-enable mongo \
|
||||||
|
;fi && \
|
||||||
pecl install mongodb && \
|
pecl install mongodb && \
|
||||||
docker-php-ext-enable mongodb \
|
docker-php-ext-enable mongodb \
|
||||||
;fi
|
;fi
|
||||||
|
@ -292,7 +292,12 @@ ARG PHP_VERSION=${PHP_VERSION}
|
|||||||
|
|
||||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||||
# Install the mongodb extension
|
# Install the mongodb extension
|
||||||
pecl -q install mongodb && \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
|
pecl install mongo && \
|
||||||
|
echo "extension=mongo.so" >> /etc/php/${PHP_VERSION}/mods-available/mongo.ini && \
|
||||||
|
ln -s /etc/php/${PHP_VERSION}/mods-available/mongo.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongo.ini \
|
||||||
|
;fi && \
|
||||||
|
pecl install mongodb && \
|
||||||
echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \
|
echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \
|
||||||
ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \
|
ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \
|
||||||
;fi
|
;fi
|
||||||
|
Loading…
Reference in New Issue
Block a user