We are having issues building a container that both contains Wildfly and ImageMagick simultaneously. In the past the Wildfly container provided by Red Hat for Wildfly 26 worked great and ImageMagick was simply installed with:
yum install -y ImageMagick
Note: This approach suffers from an outdated repo (#1), in addition to the outdated Wildfly version.
We've moved on to Wildfly 37, and the Red Hat provided base now uses a ubi9 container, which makes it miserable to install ImageMagick. Here are some attempts, that failed:
- Add EPEL and microdnf install:
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
&& microdnf install ImageMagick -y --nodocs \
&& microdnf clean all
This fails because of missing dependencies at install time that don't appear available without a subscription to Red Hat.
- Build from Source
RUN wget https://imagemagick.org/archive/ImageMagick.tar.gz \
&& tar -xvzf ImageMagick.tar.gz \
&& cd ImageMagick-* \
&& microdnf install gcc g++ -y --nodocs \
&& microdnf clean all \
&& ./configure \
&& make \
&& make install
This makes the image enormous, takes an extremely long time to build, and also fails at runtime because optional packages such as PNG support are missing.
Solution: Consider using regular distro such as AlmaLinux and yum installing ImageMagick. Then custom install Wildfly.
We are having issues building a container that both contains Wildfly and ImageMagick simultaneously. In the past the Wildfly container provided by Red Hat for Wildfly 26 worked great and ImageMagick was simply installed with:
Note: This approach suffers from an outdated repo (#1), in addition to the outdated Wildfly version.
We've moved on to Wildfly 37, and the Red Hat provided base now uses a ubi9 container, which makes it miserable to install ImageMagick. Here are some attempts, that failed:
This fails because of missing dependencies at install time that don't appear available without a subscription to Red Hat.
This makes the image enormous, takes an extremely long time to build, and also fails at runtime because optional packages such as PNG support are missing.
Solution: Consider using regular distro such as AlmaLinux and yum installing ImageMagick. Then custom install Wildfly.