From ad21cd225f3fe8f93ed40a383c882cb61f92954a Mon Sep 17 00:00:00 2001 From: bestlong Date: Fri, 1 Jun 2018 08:45:56 +0800 Subject: [PATCH] fix php 5.6 memcached build failed --- php-fpm/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 43cd2037..caf5d84c 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -224,7 +224,11 @@ ARG INSTALL_MEMCACHED=false RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Install the php memcached extension - curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \ + else \ + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \ + fi \ && mkdir -p memcached \ && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ && ( \