Commit 49664664 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

Memcache could be used by w3tc and memcached by php to store sessions

parent 345d1dfd
......@@ -12,6 +12,10 @@ RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
RUN printf "yes\n" | pecl install memcache \
&& echo 'extension=memcache.so' > /usr/local/etc/php/conf.d/pecl-memcache.ini
# Support memcached
RUN printf "yes\n" | pecl install memcached \
&& echo 'extension=memcached.so' > /usr/local/etc/php/conf.d/pecl-memcached.ini
# Composer facility
RUN curl -s -o installer.php https://getcomposer.org/installer \
&& php installer.php --install-dir=/usr/local/bin/ --filename=composer \
......
#!/bin/bash
if [ "$OPCACHE" = "false" ];
then
echo "php_flag opcache.enable Off" >> /var/www/html/.htaccess
fi
#
# Should I respect the owner of mounted volumes
#
volume=$(mount -l | awk '/var\/www\/html/{ print $3; exit; }')
if [ -n "$volume" ];
then
uid=$(stat -c %u "$volume")
gid=$(stat -c %g "$volume")
fi
if [ -n "$uid" ];
then
user=$(awk -F: "/:$uid:[0-9]+:/{ print \$1}" /etc/passwd)
group=$(awk -F: "/:x:$gid:/{ print \$1}" /etc/group)
if [ -z "$group" ];
then
usermod -g "$gid" www-data
fi
if [ -z "$user" ];
then
usermod -u "$uid" www-data
fi
fi
chown -R www-data:www-data /var/www/html
exec "$@"
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment