Installation de Memcached.

This commit is contained in:
2026-05-28 07:50:58 +02:00
parent eabfbb07e7
commit 559e71abb7
4 changed files with 30 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
services:
memcached:
restart: unless-stopped
container_name: ${CONTAINER_PREFIX}_memcached
image: ${MEMCACHED_IMAGE}
ports:
- ${MEMCACHED_PORT}
+1
View File
@@ -32,6 +32,7 @@ services:
context: ${PWD}
args:
SERVER_PHP_IMAGE: ${SERVER_PHP_IMAGE}
WITH_MEMCACHED: ${WITH_MEMCACHED}
dockerfile: ${PWD}/docker/server-php.dockerfile
labels:
+13 -1
View File
@@ -33,7 +33,19 @@ RUN apt-get update && apt-get install -y \
--with-webp \
--with-avif \
&& docker-php-ext-install zip pdo_mysql gd sockets intl \
&& apt-get clean \
# Installation de PIE (PHP Installer for Extensions : https://github.com/php/pie)
&& curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar \
&& mv /tmp/pie.phar /usr/local/bin/pie \
&& chmod +x /usr/local/bin/pie
# Installation de Memcached
ARG WITH_MEMCACHED=false
RUN if [ "$WITH_MEMCACHED" = "true" ]; then \
apt-get install -y libmemcached-dev; \
pie install php-memcached/php-memcached; \
fi
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data