YAML extension for php-cli (#2360)

* Add 'WORKSPACE_INSTALL_YAML' variable to install php yaml extension for php-cli

* Set 'INSTALL_YAML' variable to install php yaml extension for php-cli

* Install yaml extension for php-cli
This commit is contained in:
Valentino Lauciani
2019-11-13 23:08:54 +01:00
committed by Lan Phan
parent c6ad0a1a2d
commit 4e5a142c9d
3 changed files with 22 additions and 1 deletions

View File

@ -1101,6 +1101,25 @@ RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get -y install sshpass \
;fi
###########################################################################
# YAML: extension for PHP-CLI
###########################################################################
USER root
ARG INSTALL_YAML=false
RUN if [ ${INSTALL_YAML} = true ]; then \
apt-get install libyaml-dev -y ; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install -a yaml-1.3.2; \
else \
pecl install yaml; \
fi && \
echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini && \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \
;fi
###########################################################################
# FFMpeg:
###########################################################################