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

@ -110,6 +110,7 @@ services:
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT} - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${WORKSPACE_INSTALL_PING} - INSTALL_PING=${WORKSPACE_INSTALL_PING}
- INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS} - INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS}
- INSTALL_YAML=${WORKSPACE_INSTALL_YAML}
- INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE} - INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE}
- PUID=${WORKSPACE_PUID} - PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID} - PGID=${WORKSPACE_PGID}

View File

@ -140,6 +140,7 @@ WORKSPACE_INSTALL_PING=false
WORKSPACE_INSTALL_SSHPASS=false WORKSPACE_INSTALL_SSHPASS=false
WORKSPACE_INSTALL_INOTIFY=false WORKSPACE_INSTALL_INOTIFY=false
WORKSPACE_INSTALL_FSWATCH=false WORKSPACE_INSTALL_FSWATCH=false
WORKSPACE_INSTALL_YAML=false
WORKSPACE_INSTALL_MAILPARSE=false WORKSPACE_INSTALL_MAILPARSE=false
WORKSPACE_PUID=1000 WORKSPACE_PUID=1000
WORKSPACE_PGID=1000 WORKSPACE_PGID=1000
@ -826,4 +827,4 @@ GEARMAN_MYSQL_PASSWORD_FILE=
# Database to use by Gearman (Default: Gearmand) # Database to use by Gearman (Default: Gearmand)
GEARMAN_MYSQL_DB=Gearmand GEARMAN_MYSQL_DB=Gearmand
# Table to use by Gearman (Default: gearman_queue) # Table to use by Gearman (Default: gearman_queue)
GEARMAN_MYSQL_TABLE=gearman_queue GEARMAN_MYSQL_TABLE=gearman_queue

View File

@ -1101,6 +1101,25 @@ RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get -y install sshpass \ apt-get -y install sshpass \
;fi ;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: # FFMpeg:
########################################################################### ###########################################################################