APCU not appearing in an Azure Linux Docker Container

82 Views Asked by At

I am trying to get apcu working from an Azure docker container running in a Linux app service plan. I have tried the LAMP docker running locally and apcu works fine. When I run in Azure there are no errors but phpinfo() does not mention apcu, it's like it isn't there.

FROM php:7.4-apache

RUN apt-get update && apt-get install -y \
    libzip-dev \
    zlib1g-dev \
    && rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-install mysqli pdo pdo_mysql zip

RUN pecl install apcu && docker-php-ext-enable apcu

Is there something else you have to do to get APCU working in Azure?

1

There are 1 best solutions below

0
Rob Sedgwick On

Had to put this in php.ini, not sure it wasn't needed in my local Docker, which gives a warning that it is already present (but still works)

extension=apcu.so