I can build an image with this Dockerfile that is based on a lightweight Docker image that use Alpine:
FROM php:8.4.15-cli-alpine
RUN docker-php-ext-install opcache
But I can’t build an image after upgrading to PHP 8.5 — it should be noted that this 8.5 image was released only 16 hours ago:
FROM php:8.5.0-cli-alpine
RUN docker-php-ext-install opcache
It fails with this error:
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20250925/
cp: can't stat 'modules/*': No such file or directory
make: *** [Makefile:89: install-modules] Error 1
How to avoid this error? Do I have to wait for an update from docker-php-ext-install?
I tried to run docker-php-ext-configure opcache before docker-php-ext-install opcache and it worked, but didn’t fix the error.
opcacheis now already installed and that this line have to be removed.