Solved - PHP 8.2 Docker Alpine - No releases available for package "pecl.php.net/apcu"

You should build it from source code


FROM php:8.2-fpm-alpine AS ext-apcu

ENV EXT_APCU_VERSION=master
RUN curl -vvv https://github.com/krakjoe/apcu.git

RUN docker-php-source extract \
    && apk -Uu add git \
    && git clone --branch $EXT_APCU_VERSION --depth 1 https://github.com/krakjoe/apcu.git /usr/src/php/ext/apcu \
    && cd /usr/src/php/ext/apcu && git submodule update --init \
    && docker-php-ext-install apcu

FROM php:8.2-fpm-alpine

COPY --from=ext-apcu /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
COPY --from=ext-apcu /usr/local/lib/php/extensions/no-debug-non-zts-20220829/apcu.so /usr/local/lib/php/extensions/no-debug-non-zts-20220829/apcu.so

RUN php -v

Similar solution for AMQP extension in my previous article

How to compile AMQP extension for PHP 8.0 via Multistage Dockerfile
Why do this?2020-12-03 there is no PECL AMQP extension compatible with PHP 8.0 so you cannotuse docker-php-ext-install amqp & docker-php-ext-enable amqp Latest version 1.10.2 [https://pecl.php.net/package/amqp/1.10.2] is compatiblewith PHP < 8. So you have to use dev version from