From cd1d7014e41095cc31cc1ea0c6d2c277b6a92f88 Mon Sep 17 00:00:00 2001 From: leonschiphol Date: Wed, 4 Jan 2023 16:27:35 +0100 Subject: [PATCH 1/2] Added APCU installation option for the workspace container --- .env.example | 1 + docker-compose.yml | 1 + workspace/Dockerfile | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/.env.example b/.env.example index 550825f..b61c917 100644 --- a/.env.example +++ b/.env.example @@ -183,6 +183,7 @@ WORKSPACE_INSTALL_YAML=false WORKSPACE_INSTALL_RDKAFKA=false WORKSPACE_INSTALL_MAILPARSE=false WORKSPACE_INSTALL_XMLRPC=false +WORKSPACE_INSTALL_APCU=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_CHROME_DRIVER_VERSION=2.42 diff --git a/docker-compose.yml b/docker-compose.yml index 174dd25..d4f77f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -136,6 +136,7 @@ services: - INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG} - INSTALL_GRAPHVIZ=${WORKSPACE_INSTALL_GRAPHVIZ} - INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE} + - INSTALL_APCU=${WORKSPACE_INSTALL_APCU} - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${WORKSPACE_INSTALL_PING} - INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS} diff --git a/workspace/Dockerfile b/workspace/Dockerfile index e4e0aa0..b849ff6 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1338,6 +1338,21 @@ RUN if [ $INSTALL_PHALCON = true ]; then \ php -m | grep -q 'phalcon' \ ;fi +########################################################################### +# APCU: +########################################################################### + +ARG INSTALL_APCU=false + +RUN if [ ${INSTALL_APCU} = true ]; then \ + apt-get update -yqq \ + && pecl channel-update pecl.php.net; \ + pecl install apcu; \ + echo "extension=apcu.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/apcu.ini; \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/apcu.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/50-apcu.ini; \ + php -m | grep -q 'apcu' \ +;fi + ########################################################################### USER root From 1959f1f93197d7766ead12dcbd629097817952db Mon Sep 17 00:00:00 2001 From: leonschiphol Date: Wed, 4 Jan 2023 16:45:17 +0100 Subject: [PATCH 2/2] Added APCU installation option for the php-worker container --- .env.example | 1 + docker-compose.yml | 1 + php-worker/Dockerfile | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/.env.example b/.env.example index b61c917..5119fb2 100644 --- a/.env.example +++ b/.env.example @@ -317,6 +317,7 @@ PHP_WORKER_INSTALL_MEMCACHED=false PHP_WORKER_INSTALL_OCI8=false PHP_WORKER_INSTALL_MSSQL=false PHP_WORKER_INSTALL_PHALCON=false +PHP_WORKER_INSTALL_APCU=false PHP_WORKER_INSTALL_SOAP=false PHP_WORKER_INSTALL_ZIP_ARCHIVE=false PHP_WORKER_INSTALL_MYSQL_CLIENT=false diff --git a/docker-compose.yml b/docker-compose.yml index d4f77f2..142d9ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -340,6 +340,7 @@ services: - INSTALL_OCI8=${PHP_WORKER_INSTALL_OCI8} - INSTALL_MSSQL=${PHP_WORKER_INSTALL_MSSQL} - INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON} + - INSTALL_APCU=${PHP_WORKER_INSTALL_APCU} - INSTALL_XLSWRITER=${PHP_WORKER_INSTALL_XLSWRITER} - INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP} - INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE} diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 27e7f64..d34dd4d 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -327,6 +327,18 @@ RUN if [ $INSTALL_PHALCON = true ]; then \ php -m | grep -q 'phalcon' \ ;fi +# Install APCU ext +ARG INSTALL_APCU=false + +RUN if [ ${INSTALL_APCU} = true ]; then \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install -a apcu-4.0.11; \ + else \ + pecl install apcu; \ + fi && \ + docker-php-ext-enable apcu \ +;fi + ARG INSTALL_GHOSTSCRIPT=false RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \ apk --update add ghostscript \