[DOCKER] Updated dockerfile to add memcached

This commit is contained in:
Hugo Sales 2020-03-01 23:55:54 +00:00 committed by Hugo Sales
parent 51d1ea4f8f
commit 5ec23f2200

View File

@ -2,7 +2,16 @@ FROM php:fpm-alpine
RUN apk update && apk add gettext-dev icu-dev zlib-dev libpng-dev gmp-dev postgresql-dev
ARG exts="bcmath exif gd gettext gmp intl mysqli opcache pdo pdo_pgsql pgsql"
ARG exts=" bcmath exif gd gettext gmp intl mysqli opcache pdo pdo_pgsql pgsql"
RUN docker-php-ext-install ${exts} \
&& docker-php-ext-enable ${exts}
ARG MEMCACHED_DEPS="zlib-dev libmemcached-dev cyrus-sasl-dev"
RUN apk add libmemcached-libs zlib
RUN apk add --virtual .phpize-deps $PHPIZE_DEPS \
&& apk add --virtual .memcached-deps $MEMCACHED_DEPS \
&& pecl install memcached \
&& echo "extension=memcached.so" > /usr/local/etc/php/conf.d/20_memcached.ini \
&& rm -rf /usr/share/php7 \
&& rm -rf /tmp/* \
&& apk del .memcached-deps .phpize-deps
RUN docker-php-ext-install ${exts}