Skip to content

Commit 5677564

Browse files
authored
Merge pull request laradock#1581 from bestlong/php5-fpm-memcached-build-faile
Fix php 5.6 memcached build failed
2 parents f2f5aea + ad21cd2 commit 5677564

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

php-fpm/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ ARG INSTALL_MEMCACHED=false
224224

225225
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
226226
# Install the php memcached extension
227-
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
227+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
228+
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
229+
else \
230+
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \
231+
fi \
228232
&& mkdir -p memcached \
229233
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
230234
&& ( \

0 commit comments

Comments
 (0)