fix mongodb php extension config

This commit is contained in:
avenli 2017-05-24 14:47:12 +08:00
parent bf4a5beb0b
commit 9e81f92d58
3 changed files with 6 additions and 3 deletions

View File

@ -186,7 +186,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
pecl install mongodb && \ pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/5.6/cli/conf.d/30-mongodb.ini \ echo "extension=mongodb.so" >> /etc/php/5.6/mods-available/mongodb.ini && \
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \
;fi ;fi
##################################### #####################################

View File

@ -186,7 +186,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
pecl install mongodb && \ pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \ echo "extension=mongodb.so" >> /etc/php/7.0/mods-available/mongodb.ini && \
ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \
;fi ;fi
##################################### #####################################

View File

@ -182,7 +182,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
pecl install mongodb && \ pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/7.1/cli/conf.d/30-mongodb.ini \ echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
;fi ;fi
##################################### #####################################