Page MenuHomePhabricator

mediawiki:1.39.3 docker image build fails during memcached installation with pecl
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • In Dockerfile
FROM mediawiki:1.39.3
...
RUN apt-get update && apt-get install -y memcached libmemcached-dev zlib1g-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached 
...

What happens?:

Since last week the image is build in debian bookworm (instead of bullseye) and the following error occurs:

...
checking for libmemcached location... configure: error: memcached support requires libmemcached. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/tmp/pear/temp/memcached/configure --with-php-config=/usr/local/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes' failed

The mediawiki docker parent image is 'php:8.1-apache' based on bullseye. Won't php8.1 be supported in bullseye anymore?

What should have happened instead?:

No error during docker build should occur.

Software version (skip for WMF-hosted wikis like Wikipedia):

MW 1.39

Other information (browser name/version, screenshots, etc.):

Event Timeline

Why are we even using pecl to install the memcached extension in the first place? Some dependant image?

No dependant image, I am open to any working solution. and the big question still, why is the image build with bookworm?

Presumably because it's the latest debian stable?

Yes, it is the latest debian stable. How to install memcached without errors?

kostajh subscribed.

FROM mediawiki:1.39.3

It's confusing, but this isn't the same thing as MediaWiki-Docker which uses the images referenced in docker-compose.yml.

In the meantime similar issues were reported:
https://serverfault.com/questions/1134001/memcached-support-requires-libmemcached
https://stackoverflow.com/questions/76490445/problem-adding-memcached-support-in-docker-for-php8-1-using-bookworm

The workaround to replace the Mediawiki parent image "8.1-apache" with "8.1-apache-bullseye" in order to force to use Debian 11 it is working, the error won't occur, but it is not the final solution.

Is this still an issue or is there anything we could do regarding the docker images? If yes I am happy to take a look, otherwise I think this can be closed 😊

S0ring claimed this task.

As mentioned before, the workaround has helped, no issue anymore. Sorry, I should have closed the ticket a while ago.