Perl / docker-perl-tester

Docker images with pre-installed test modules and test dependencies for CPAN modules
28 stars 14 forks source link

Shrink the images. #66

Closed rspier closed 5 months ago

rspier commented 5 months ago

bookworm before: 1.6GB slim-bookworm: 1.03GB slim-bookworm clean: 572MB

The larger image (with a ton of files) takes a long time to download and initialize. (40% of the time to run pause tests in GitHub actions.) A smaller image is faster to download and unpack.

There is a tiny chance that someone relying on the new bookworm image is relying on a package that isn't installed by default in the slim images, but the bookworm image has only existed for a week or so, so there are likely to be very few users.

rspier commented 5 months ago

If you'd prefer, we could build both slim and non-slim versions of bookworm. (But I'm not sure that's necessary.)

We can also consider adding a few more Debian packages to facilitate common packages.

For pause, I needed to add:

oalders commented 5 months ago

Thanks for all of the PRs @rspier! This one needs a conflict resolved.

rspier commented 5 months ago

Conflict resolved.

rspier commented 5 months ago

FWIW, I could shrink it even further at the cost of it being more difficult to install additional non-pure-Perl modules. (e.g. I could remove gcc and stuff). This seemed not worth it after achieving a 60% reduction.

oalders commented 5 months ago

This seemed not worth it after achieving a 60% reduction.

Right. I think we'd want to err on the side of ease of use here as the images are meant to give you a fairly large hammer out of the box.

rspier commented 5 months ago

fairly large hammer out of the box

700MB large is plenty, compared to 1.6GB large :)

atoomic commented 5 months ago

Awesome thanks for the PR