Skip to content

Commit

Permalink
fix memcached
Browse files Browse the repository at this point in the history
  • Loading branch information
htuscher committed Dec 4, 2020
1 parent d29fb10 commit d27254c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docker/php-official/7.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ RUN set -x \
opcache \
# Install extensions for PHP 7.x
&& pecl install apcu \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached-3.0.4 \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
Expand Down
2 changes: 1 addition & 1 deletion docker/php-official/7.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ RUN set -x \
opcache \
# Install extensions for PHP 7.x
&& pecl install apcu \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached-3.0.4 \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
Expand Down
2 changes: 1 addition & 1 deletion docker/php-official/7.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ RUN set -x \
opcache \
# Install extensions for PHP 7.x
&& pecl install apcu \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached-3.0.4 \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
Expand Down
8 changes: 2 additions & 6 deletions docker/php-official/7.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,8 @@ RUN set -x \
opcache \
# Install extensions for PHP 7.x
&& pecl install apcu \
# Memcached for 7.3 can currently only be built from master
&& MEMCACHED="`mktemp -d`" \
&& curl -skL https://github.com/php-memcached-dev/php-memcached/archive/master.tar.gz | tar zxf - --strip-components 1 -C $MEMCACHED \
&& docker-php-ext-configure $MEMCACHED \
&& docker-php-ext-install $MEMCACHED \
&& rm -rf $MEMCACHED \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
&& echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \
Expand Down
8 changes: 2 additions & 6 deletions docker/php-official/7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,8 @@ RUN set -x \
opcache \
# Install extensions for PHP 7.x
&& pecl install apcu \
# Memcached for 7.3 can currently only be built from master
&& MEMCACHED="`mktemp -d`" \
&& curl -skL https://github.com/php-memcached-dev/php-memcached/archive/master.tar.gz | tar zxf - --strip-components 1 -C $MEMCACHED \
&& docker-php-ext-configure $MEMCACHED \
&& docker-php-ext-install $MEMCACHED \
&& rm -rf $MEMCACHED \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
&& echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \
Expand Down
11 changes: 1 addition & 10 deletions template/Dockerfile/images/php.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,8 @@
{%- else %}
# Install extensions for PHP 7.x
&& pecl install apcu \
{%- if version == '7.3' or version == '7.4' or version == '8.0' %}
# Memcached for 7.3 can currently only be built from master
&& MEMCACHED="`mktemp -d`" \
&& curl -skL https://github.com/php-memcached-dev/php-memcached/archive/master.tar.gz | tar zxf - --strip-components 1 -C $MEMCACHED \
&& docker-php-ext-configure $MEMCACHED \
&& docker-php-ext-install $MEMCACHED \
&& rm -rf $MEMCACHED \
{%- else %}
&& printf "no --disable-memcached-sasl\n" | pecl install memcached-3.0.4 \
&& printf "no --disable-memcached-sasl\n" | pecl install memcached \
&& echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \
{%- endif %}
# Install vips (only works with PHP >= 7.0)
&& printf "\n" | pecl install vips \
&& echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \
Expand Down

0 comments on commit d27254c

Please sign in to comment.