docker-php-extension-installer icon indicating copy to clipboard operation
docker-php-extension-installer copied to clipboard

Externalize `buildRequiredPackageLists`

Open axelrindle opened this issue 6 months ago • 1 comments

Introduction

While inspecting the script I noticed that runtime dependencies of the extensions are hardcoded into the script without the possibility to use this data elsewhere.

I'd like to propose storing these permanent and volatile dependencies, collected in the buildRequiredPackageLists function, elsewhere, in a JSON file for example.

Background

For a corporate project we're pre-building Php extensions targeting a fixed environment. In it's current state permanent and volatile dependencies are also hardcoded in a script of ours.

Benefits

Providing permanent and volatile dependencies in a machine-readable way would bring the following benefits imo :

  1. Folks not building for Debian or Alpine can get a better overview of packages they should look for in their distribution.
  2. Pre-building extensions comes without the hassle of manually collecting the required runtime dependencies.

Please let me know what you think and what possibilities you see in achieving this functionality.

axelrindle avatar Jul 11 '25 21:07 axelrindle

Dependencies vary depending on the operating system version, the PHP version, and the version of the extensions you want to preinstall. So, no, I don't think it's possible to pre-define the list of system libraries to install. If you really need to, use the script to install what you need and capture the lines printed on the screen listing the libraries.

mlocati avatar Jul 11 '25 22:07 mlocati