fix PHP Warning: PHP Startup: Unable to load dynamic library 'phalcon.so' (#1947)

when install APCu and no install Phalcon.
This commit is contained in:
Shao Yu-Lung (Allen) 2019-01-10 21:50:59 +08:00 committed by GitHub
parent 04f071555c
commit acac6eb229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -530,18 +530,19 @@ ARG INSTALL_PHALCON=false
ARG LARADOCK_PHALCON_VERSION
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
# Copy phalcon configration
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable
RUN if [ $INSTALL_PHALCON = true ]; then \
apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
&& ./install \
&& mv /usr/local/etc/php/conf.d/phalcon.ini.disable /usr/local/etc/php/conf.d/phalcon.ini \
&& rm -rf /tmp/cphalcon* \
;fi
# Copy phalcon configration
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini
###########################################################################
# APCU:
###########################################################################