Merge pull request #2582 from kideny/master

update support phalcon4.X version
This commit is contained in:
Shao Yu-Lung (Allen) 2020-06-06 17:36:27 +08:00 committed by GitHub
commit f2209eeb72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 3 deletions

View File

@ -44,7 +44,7 @@ PHP_VERSION=7.3
### Phalcon Version ########################################### ### Phalcon Version ###########################################
# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+ # Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+
PHALCON_VERSION=3.4.5 PHALCON_VERSION=4.0.5
### PHP Interpreter ####################################### ### PHP Interpreter #######################################

View File

@ -721,7 +721,14 @@ ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable
RUN if [ $INSTALL_PHALCON = true ]; then \ RUN if [ $INSTALL_PHALCON = true ]; then \
apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \ apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c git automake autoconf\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \ && cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \

View File

@ -1 +1,2 @@
extension=psr.so
extension=phalcon.so extension=phalcon.so

View File

@ -207,6 +207,13 @@ ENV PHALCON_VERSION ${PHALCON_VERSION}
RUN if [ $INSTALL_PHALCON = true ]; then \ RUN if [ $INSTALL_PHALCON = true ]; then \
apk --update add unzip gcc make re2c bash\ apk --update add unzip gcc make re2c bash\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${PHALCON_VERSION}/build \ && cd /tmp/cphalcon-${PHALCON_VERSION}/build \

View File

@ -1178,11 +1178,19 @@ ARG LARADOCK_PHALCON_VERSION
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION} ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
RUN if [ $INSTALL_PHALCON = true ]; then \ RUN if [ $INSTALL_PHALCON = true ]; then \
apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c \ apt-get update && apt-get install -y unzip libpcre3-dev gcc make re2c git automake autoconf\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \ && curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \ && unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \ && cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
&& ./install \ && ./install \
&& echo "extension=psr.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
&& echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \ && echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \ && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \
&& rm -rf /tmp/cphalcon* \ && rm -rf /tmp/cphalcon* \