Skip to content

feat(build): Support ImageMagick in docker build #524

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

Closed

Conversation

terussell85
Copy link

@terussell85 terussell85 commented Feb 19, 2025

The current Dockerfile appears to intentionally disable support for the magickloader when building libvips. This makes sense from a default security sense.

However, it would be nice if an ImageMagick variant was built for those that wanted it. This PR modifies the Dockerfile to allow passing of an ARG to enable ImageMagick.

Notable changes:

  1. Add ARGs for enabling ImageMagick and specifting versions
  2. Move build logic into bash scripts for easier refactoring
  3. Conditionally build libraw
  4. Conditionally build ImageMagick using imei

Most of the required ImageMagick libs for processing are already included because the previous Dockerfile installed them for libvips anyways. So those didn't have to change.

Note: This PR does not update the corresponding build workflows. It would be nice if those are updated to produce a new tag by default if these changes are accepted, but I didn't want to modify workflows that don't run on my fork.

@terussell85
Copy link
Author

When paired with #523, this allows processing of files using the magickloader in the Docker container.

@cshum
Copy link
Owner

cshum commented May 29, 2025

@terussell85 It is intended too keep ImageMagick out of this main build for security reasons.

However I am looking to create a separated Docker build in a separated repository, where ImageMagick is enabled as a fallback. I will let you know when such build is ready.

@cshum cshum closed this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants