Installation de Memcached.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
|
||||
memcached:
|
||||
restart: unless-stopped
|
||||
container_name: ${CONTAINER_PREFIX}_memcached
|
||||
image: ${MEMCACHED_IMAGE}
|
||||
ports:
|
||||
- ${MEMCACHED_PORT}
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user