thecodingmachine / docker-images-php

A set of PHP Docker images
MIT License
791 stars 140 forks source link

Redis extension does not work without igbinary #255

Closed ikulis closed 2 years ago

ikulis commented 3 years ago

As follow up from https://github.com/thecodingmachine/docker-images-php/issues/213 , Kudos to https://github.com/thecodingmachine/docker-images-php/issues/213#issuecomment-815307490

Expected Behavior

Image should work by just adding redis extension without you need to add igbinary.

Current Behavior

Starting image fails:

$ docker-compose up web
Recreating redis-breaks_web_1 ... done
Attaching to redis-breaks_web_1
web_1  | PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
web_1  | /usr/local/bin/docker-entrypoint-as-root.sh: line 129: supercronic: command not found
web_1  | PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
web_1  | bash: line 2: syntax error near unexpected token `('
web_1  | bash: line 2: `Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0'
redis-breaks_web_1 exited with code 2

Possible Solution

Steps to Reproduce (for bugs)

  1. Make Dockerfile
    
    # Required default PHP extensions
    ARG PHP_EXTENSIONS="redis"

Image for the development

FROM thecodingmachine/php:7.4-v3-slim-apache

2. Make `docker-compose.yml` 
```yml
version: '3.4'

services:
  web:
    build: ./
    environment:
      TEMPLATE_PHP_INI: "development"
      PHP_INI_ERROR_REPORTING: "E_ERROR"
      PHP_EXTENSION_XDEBUG: "0"
      PHP_INI_XDEBUG__REMOTE_AUTOSTART: "0"
      TZ: "Europe/Amsterdam"
      APACHE_DOCUMENT_ROOT: "public"
    volumes:
      - "./:/var/www/html/"
  1. docker-compose build
  2. docker-compose up web
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please update it if any action still required.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. Please, reopen if you need.