docker-nginx-php icon indicating copy to clipboard operation
docker-nginx-php copied to clipboard

Question: How to install php-redis on 5.4?

Open ianldgs opened this issue 5 years ago • 0 comments

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/*

ianldgs avatar Oct 23 '18 13:10 ianldgs