From 2dc5954bbfd909e7cefe89ccb5c2b632d7361ae7 Mon Sep 17 00:00:00 2001 From: Marcos Kubis Date: Sun, 19 Sep 2021 17:48:42 -0300 Subject: [PATCH] Add php trader extension --- .env.example | 2 ++ docker-compose.yml | 2 ++ php-fpm/Dockerfile | 13 +++++++++++++ workspace/Dockerfile | 15 +++++++++++++++ 4 files changed, 32 insertions(+) diff --git a/.env.example b/.env.example index bad14536..37a46465 100644 --- a/.env.example +++ b/.env.example @@ -198,6 +198,7 @@ WORKSPACE_INSTALL_PROTOC=false WORKSPACE_INSTALL_PHPDECIMAL=false WORKSPACE_INSTALL_ZOOKEEPER=false WORKSPACE_INSTALL_SSDB=false +WORKSPACE_INSTALL_TRADER=false WORKSPACE_PROTOC_VERSION=latest WORKSPACE_INSTALL_MEMCACHED=true @@ -262,6 +263,7 @@ PHP_FPM_INSTALL_WKHTMLTOPDF=false PHP_FPM_INSTALL_PHPDECIMAL=false PHP_FPM_INSTALL_ZOOKEEPER=false PHP_FPM_INSTALL_SSDB=false +PHP_FPM_INSTALL_TRADER=false PHP_FPM_FFMPEG=false PHP_FPM_AUDIOWAVEFORM=false PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8" diff --git a/docker-compose.yml b/docker-compose.yml index 0538fe9f..295be6c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -166,6 +166,7 @@ services: - INSTALL_PHPDECIMAL=${WORKSPACE_INSTALL_PHPDECIMAL} - INSTALL_ZOOKEEPER=${WORKSPACE_INSTALL_ZOOKEEPER} - INSTALL_SSDB=${WORKSPACE_INSTALL_SSDB} + - INSTALL_TRADER=${WORKSPACE_INSTALL_TRADER} - PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION} - INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT} - INSTALL_MEMCACHED=${WORKSPACE_INSTALL_MEMCACHED} @@ -267,6 +268,7 @@ services: - INSTALL_PHPDECIMAL=${PHP_FPM_INSTALL_PHPDECIMAL} - INSTALL_ZOOKEEPER=${PHP_FPM_INSTALL_ZOOKEEPER} - INSTALL_SSDB=${PHP_FPM_INSTALL_SSDB} + - INSTALL_TRADER=${PHP_FPM_INSTALL_TRADER} - DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} - PUID=${PHP_FPM_PUID} - PGID=${PHP_FPM_PGID} diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d6638a9e..ab63bccd 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -1029,6 +1029,19 @@ RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then \ && apt -f install \ ;fi +##################################### +# trader: +##################################### + +USER root + +ARG INSTALL_TRADER=false + +RUN if [ ${INSTALL_TRADER} = true ]; then \ + pecl install trader \ + && echo "extension=trader.so" >> $PHP_INI_DIR/conf.d/trader.ini \ +;fi + ########################################################################### # Mailparse extension: ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index d017a9d6..a44f27c7 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1668,6 +1668,21 @@ RUN set -xe; \ && rm /tmp/ssdb-client-php.tar.gz \ && docker-php-ext-enable ssdb \ ;fi + +##################################### +# trader: +##################################### + +USER root + +ARG INSTALL_TRADER=false + +RUN if [ ${INSTALL_TRADER} = true ]; then \ + pecl install trader \ + && echo "extension=trader.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/trader.ini \ + && ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/trader.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-trader.ini \ +;fi + # #-------------------------------------------------------------------------- # Final Touch