Merge pull request #2519 from GinoPane/bugfix/#2506

Fix #2506
This commit is contained in:
Shao Yu-Lung (Allen) 2020-03-04 14:28:51 +08:00 committed by GitHub
commit c32bf95530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -585,10 +585,13 @@ ARG AST_VERSION=1.0.3
ENV AST_VERSION ${AST_VERSION}
RUN if [ ${INSTALL_AST} = true ]; then \
# Install AST extension
printf "\n" | pecl -q install ast-${AST_VERSION} && \
echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \
phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \
# AST extension requires PHP 7.0.0 or newer
if [ $(php -r "echo PHP_MAJOR_VERSION;") != "5" ]; then \
# Install AST extension
printf "\n" | pecl -q install ast-${AST_VERSION} && \
echo "extension=ast.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/ast.ini && \
phpenmod -v ${LARADOCK_PHP_VERSION} -s cli ast \
;fi \
;fi
###########################################################################