From 8477ca86f584a3495e7137641e3caf260ed0271b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Zonta?= Date: Thu, 28 May 2020 09:50:30 -0300 Subject: [PATCH] Fixed error with memcached when running php-worker --- php-worker/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 9568177c..b409198c 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -37,7 +37,11 @@ RUN apk --update add wget \ supervisor RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl -RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb +RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl channel-update pecl.php.net && pecl install memcached-2.2.0 mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb \ +;else \ + pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb \ +;fi # Add a non-root user: ARG PUID=1000