From f016880fa2bd0b9c4086b77e48f21e3dd561d7c5 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Thu, 30 Mar 2023 13:33:58 +0800 Subject: [PATCH] fix: php 5.6 APCU --- workspace/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 116ffe75..0eb9ff27 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1351,9 +1351,11 @@ RUN if [ $INSTALL_PHALCON = true ]; then \ ARG INSTALL_APCU=false RUN if [ ${INSTALL_APCU} = true ]; then \ - apt-get update -yqq \ - && pecl channel-update pecl.php.net; \ - pecl install apcu; \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install apcu-4.0.11; \ + else \ + pecl install apcu; \ + fi && \ 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' \