Skip to content

Docker build fails, Wildfly base image too inflexible #4

Description

@slominskir

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:

  1. 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.

  1. 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions