S
S
Sergey Beloventsev2020-07-22 09:25:16
Docker
Sergey Beloventsev, 2020-07-22 09:25:16

Why not install php extension redis?

trying to put connect radish container here is compose

php-fpm:
    build: docker/php-fpm
    depends_on:
      - db
      - redis
    links:
      - redis
      - db
    volumes:
      - "./:/www"
    environment:
      - DOCKER_PHP_CONFIG=${DOCKER_PHP_CONFIG}
      - DOCKER_XDEBUG=${DOCKER_XDEBUG}
      - DOCKER_SUPERVISOR=${DOCKER_SUPERVISOR}
      - DOCKER_CRON=${DOCKER_CRON}
    networks:
        - laravel
      php-fpm:
    build: docker/php-fpm
    depends_on:
      - db
      - redis
    links:
      - redis
      - db
    volumes:
      - "./:/www"
    environment:
      - DOCKER_PHP_CONFIG=${DOCKER_PHP_CONFIG}
      - DOCKER_XDEBUG=${DOCKER_XDEBUG}
      - DOCKER_SUPERVISOR=${DOCKER_SUPERVISOR}
      - DOCKER_CRON=${DOCKER_CRON}
    networks:
        - laravel


like this in php-fpm dockerfile
RUN pecl install redis-5.3.1 \
 && docker-php-ext-enable redis


this is the answer i get
Starting to download redis-5.3.1.tgz (264,485 bytes)
......................................................done: 264,485 bytes
29 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c pecl install redis-5.3.1  && docker-php-ext-enable redis' returned a non-zero code: 1

what is not so?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question