How to install php-redis extension using the official PHP Docker image approach?

前端 未结 11 1014
Happy的楠姐
Happy的楠姐 2021-01-30 02:21

I want to build my PHP-FPM image with php-redis extension based on the official PHP Docker image, for example, using this Dockerfile: php:5.6-fpm.

The docs

11条回答
  •  盖世英雄少女心
    2021-01-30 02:39

    In your Dockerfile you can clone the repo and install it with:

    RUN git clone https://github.com/phpredis/phpredis.git /tmp/phpredis \
    && cd /tmp/phpredis \
    && git checkout -b 3.1.2 \ ## or the release you need #
    && phpize \
    && ./configure \
    && make \
    && make install
    

提交回复
热议问题