docker-nginx-php
docker-nginx-php copied to clipboard
Question: How to install php-redis on 5.4?
What I got so far:
RUN rm /etc/apt/sources.list.d/ondrej-php5-oldstable-precise.list \
&& apt-get update \
&& apt-get install -y make php5-dev \
&& yes '' | pecl install -o -f redis \
&& echo 'extension=redis.so' >> /etc/php5/fpm/php.ini \
&& service php5-fpm restart \
&& rm -rf /var/lib/apt/lists/*
Or:
RUN rm /etc/apt/sources.list.d/ondrej-php5-oldstable-precise.list \
&& apt-get update \
&& apt-get install -y make php5-dev \
&& pecl config-set php_ini /etc/php5/fpm/php.ini \
&& pecl install -o -f igbinary \
&& echo 'extension=igbinary.so' >> /etc/php5/fpm/php.ini \
&& yes | pecl install -o -f redis \
&& echo 'extension=redis.so' >> /etc/php5/fpm/php.ini \
&& rm -rf /var/lib/apt/lists/*