We've configured a Dockerfile containing the following code snippet:
ENV MEMCACHE_VERSION=8.0 \
MEMCACHED_VERSION=3.2.0
############## END ENVIRONMENT VARIABLES ###############
########################################################
RUN apt-get update && apt-get install -y --no-install-recommends \
zlib1g-dev \
zlib1g \
libmemcached11 \
libmemcachedutil2 \
libmemcached-dev \
libmagickwand-dev
RUN pecl install memcache-$MEMCACHE_VERSION && \
pecl install memcached-$MEMCACHED_VERSION && \
pecl install imagick
But yesterday starting from 17:00 after running docker compose up --build -d --force-recreate
all of a sudden the following error started occuring. Note: This did not happen before 17:00, the whole day it worked just fine.
=> ERROR [builder 3/3] RUN pecl install memcache-8.0 && pecl install memcached-3.2.0 && pecl install imagick 15.1s
#0 15.03 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
#0 15.06 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
------
failed to solve: process "/bin/sh -c pecl install memcache-$MEMCACHE_VERSION && pecl install memcached-$MEMCACHED_VERSION && pecl install imagick" did not complete successfully: exit code: 1
I want to repeat that we haven't changed anything in the Dockerfile and this started happening to my other colleagues docker environments as well as if something has changed in the libmemcached or memcached modules since yesterday around this time.
What we've already tried:
- Using the option behind the commands
-with-libmemcached-dir=/usr/include/libmemcached
- Updating Docker Desktop
- Install libmemcached manually on the docker container and uncommenting the memcache/memcached/imagick installs code below to see if libmemcached was installer for real. libmemcached was present in the folder /usr/include/libmemcached. Running the memcached installation right after resulted in the same error
- Freak out and stare at the screen hoping it will go away