Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up Docker build #374

Merged

Conversation

marc-vanderwal
Copy link
Contributor

Purpose

This PR amends the Dockerfile for zonemaster-cli so as to install as many prerequisite packages from binary packages as possible, thereby speeding up the build.

Context

Release testing for v2024.1.

Changes

  • Install most transitive dependencies for Zonemaster-CLI by means of binary packages.

How to test this PR

Try to build the Docker image. The build process should only pick up six small packages from CPAN. Notably, Moose shouldn’t be picked up from CPAN.

Try to install as many prerequisite packages from binary packages as
possible in order to speed up the build.

Some packages are both build-time and runtime dependencies, and because
this is a two-stage Docker build, some packages need to be installed
twice.
@matsduf
Copy link
Contributor

matsduf commented Jun 20, 2024

Does this increase or decrease the Docker image size?

@marc-vanderwal
Copy link
Contributor Author

There is a slight decrease. To compare:

  • a v6.1.0 image pulled from Docker Hub is 62.1 MB after decompression;
  • currently, on develop, a Docker build yields an image whose size is 61.5 MB;
  • with the change introduced by this PR, the image size shrinks to 60 MB.

@matsduf matsduf added the V-Patch Versioning: The change gives an update of patch in version. label Jun 25, 2024
@tgreenx tgreenx added this to the v2024.1 milestone Jun 25, 2024
@tgreenx tgreenx merged commit 2aafea4 into zonemaster:develop Jun 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants