mlocati/docker-php-extension-installer

`redis` from source cannot be installed (download/clone submodules)

mvorisek opened this issue · 3 comments

Version of install-php-extensions

latest + php-src master

issue is present on both Alpine and Debian

Error description

...
#10 166.1 ### INSTALLING REMOTE MODULE redis ###
#10 166.3   (installing version 6.0.2 from /tmp/src/tmp.ko5iVVBxCv/phpredis-8a39caebe89)
#10 166.4 ERROR: file /tmp/src/tmp.ko5iVVBxCv/phpredis-8a39caebe89/liblzf/LICENSE does not exist

Docker image

ghcr.io/mvorisek/image-php:8.4-debian-base

Minimal Dockerfile

install-php-extensions phpredis/phpredis@8a39caebe89

liblzf is a submodule, is it correctly recursively checkout before install?

install-php-extensions doesn't use git to download repositories (git is rather big).
What I'd do in your script/process:

  1. install git
  2. clone redis and its submodules
  3. run install-php-extensions passing it the folder containing the local redis clone
  4. delete the local redis clone
  5. uninstall git

Thank you.

In theory https://github.com/mlocati/docker-php-extension-installer/blob/2.2.5/install-php-extensions#L285 could use git when present, but let's not complicate things, submodules are rare.