Bug 37417

Summary: Add ENV variable to download extra packages into ktd container
Product: Project Infrastructure Reporter: Michał <schodkowy.omegi-0r>
Component: Koha Testing Docker (ktd)Assignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Michał 2024-07-22 08:10:41 UTC
env/defaults.env specifies `EDITOR=vim`, but by default some alternative popular options like `nano` are not installed in the container. To allow some user freedom in changing this without bloating the container image, I propose adding some environment variable that'd install any extra programs at the start-up, which could cover more useful use-cases than just the editor change that prompted the idea.

It could just run something like this on startup:
> apt-get update && apt-get install -y $(APT_INSTALL_PACKAGES)

...assuming the APT_INSTALL_PACKAGES env var is defined and non-empty (with space-separated list of packages to install), the exact name of the env var is TBD, it doesn't really matter.

Note: you need to run apt(-get) update first, otherwise the package lists are going to be outdated, and thus old package versions will be gone from mirrors and result in 404 upon download attempt of packages!