heroku / base-images

Recipes for building the base images for Heroku's stacks
BSD 3-Clause "New" or "Revised" License
267 stars 75 forks source link

Add missing runtime libs to heroku-22 and heroku-24 #317

Closed dzuelke closed 2 weeks ago

dzuelke commented 2 months ago

As a general rule, we make dynamic libraries available in the run base images if the packages containing headers for dynamic linking (typically named lib…-dev) are present in the build image.

This ensures that programs that dynamically link against libraries using these headers at build time (e.g. native extensions for various languages) work reliably at runtime.

A recent review of the list of packages on all stacks turned up a number of packages that aren't available at runtime, but have build time headers.

Ignoring heroku-20 (as it is deprecated), and disregarding libpcre… libraries for character strings other than UTF-8 (which already are in the run images) as well as X11-related libraries, we're missing the following:

heroku-22:

heroku-24:

GUS-W-16381871

dzuelke commented 1 month ago

Sizes:

% docker run -u root --rm -ti heroku/heroku:22 bash
root@2e3c355b3af4:/# apt-get update
…
root@2e3c355b3af4:/# apt-get install libgeoip1 libhashkit2 libmemcachedutil2 libnetpbm10 libwmf-0.2-7
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  geoip-bin libwmf-0.2-7-gtk
The following NEW packages will be installed:
  libgeoip1 libhashkit2 libmemcachedutil2 libnetpbm10 libwmf-0.2-7
0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
Need to get 284 kB of archives.
After this operation, 1001 kB of additional disk space will be used.
…
% docker run -u root --rm -ti heroku/heroku:24 bash      
root@5e5722257542:/# apt-get update
…
root@5e5722257542:/# apt-get install libgirepository-1.0-1 libidn12 libmemcachedutil2t64 libwebpdecoder3 libwmf-0.2-7
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  libwmf-0.2-7-gtk
The following NEW packages will be installed:
  libgirepository-1.0-1 libidn12 libmemcachedutil2t64 libwebpdecoder3
  libwmf-0.2-7
0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded.
Need to get 328 kB of archives.
After this operation, 1278 kB of additional disk space will be used.
…
edmorley commented 2 weeks ago

@dzuelke Could you update the PR description so it matches the final version of the PR? :-)