-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Hi,
I noticed an issue with how pecl install is called for Redis and Memcached in Dockerfile-alpine.template.
The Problem
Currently, the arguments are passed in the wrong order. This triggers errors during the build process, causing the --configureoptions to be treated as invalid package names. Consequently, these options are ignored, and the extensions are installed without the intended features (like igbinary or zstd support), although the build process itself does not fail.
Relevant Code
docker/Dockerfile-alpine.template
Lines 66 to 69 in dea057b
| pecl install memcached-%%MEMCACHED_VERSION%% \ | |
| --configureoptions 'enable-memcached-igbinary="yes"'; \ | |
| pecl install redis-%%REDIS_VERSION%% \ | |
| --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \ |
Error Log
=> # invalid package name/package file "enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes""
=> # invalid package name/package file "--configureoptions"
=> # parsePackageName(): only one version/state delimiter "-" is allowed in "enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes""
Root Cause
The pecl command is strict about argument parsing. As seen in pecl help install, the options must be placed before the package name:
pecl install [options] [channel/]<package> ...Proposed Solution
Moving the --configureoptions flags before the package name resolves the parsing errors and ensures the extensions are built with the correct configuration.
I can submit a PR for this if needed.
#Bug