Installing APCu in PHP-FPM in Docker

i.e in php:7-fpm or php:7-fpm-alpine

In your Dockerfile:


    RUN apk add --update --no-cache --virtual .build-dependencies $PHPIZE_DEPS \
            && pecl install apcu \
            && docker-php-ext-enable apcu \
            && pecl clear-cache \
            && apk del .build-dependencies