• Comments
  • Suddenly not able to install PHP 7.4 anymore in image based on ubi8

    Posted on

    I have been working with the following Dockerfile for quite a while now and I always was able to build it with Podman as expected.

    FROM redhat/ubi8 as httpd-php_base
    
    RUN yum module enable php:7.4 -y
    RUN    yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y \
        &&   yum install php php-gd php-intl php-mysqli php-xsl php-soap php-opcache php-odbc php-json freetds openssl -y
    RUN yum install httpd mod_ssl -y
    
    COPY --chmod=755 ./startup.sh /usr/bin/startup.sh
    EXPOSE 8080
    EXPOSE 8443 
    
    RUN yum install make php-devel php-pear -y
    RUN yes | pecl install xdebug-3.0.0
    

    Since yesterday however (the first time I noticed), the build fails at and with the following command and error message:

    [1/4] STEP 6/20: RUN yum module install php:7.4 -y
    Updating Subscription Management repositories.
    Unable to read consumer identity
    
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    
    Red Hat Universal Base Image 8 (RPMs) - BaseOS  2.0 MB/s | 783 kB     00:00
    Red Hat Universal Base Image 8 (RPMs) - AppStre 3.6 MB/s | 2.0 MB     00:00
    Red Hat Universal Base Image 8 (RPMs) - CodeRea 124 kB/s |  18 kB     00:00
    Unable to resolve argument php:7.4
    No match for package php-cli
    Unable to resolve argument php:7.4
    No match for package php-common
    Unable to resolve argument php:7.4
    No match for package php-fpm
    Unable to resolve argument php:7.4
    No match for package php-mbstring
    Unable to resolve argument php:7.4
    No match for package php-xml
    Error: Problems in request:
    broken groups or modules: php:7.4, php:7.4, php:7.4, php:7.4, php:7.4
    Error: error building at STEP "RUN yum module install php:7.4 -y": error while running runtime: exit status 1
    

    If I replace "module install" with "module enable", I get

    All matches were filtered out by modular filtering for argument: php
    All matches were filtered out by modular filtering for argument: php-gd
    All matches were filtered out by modular filtering for argument: php-intl
    All matches were filtered out by modular filtering for argument: php-mysqli
    All matches were filtered out by modular filtering for argument: php-xsl
    All matches were filtered out by modular filtering for argument: php-soap
    All matches were filtered out by modular filtering for argument: php-opcache
    All matches were filtered out by modular filtering for argument: php-odbc
    Error: Unable to find a match: php php-gd php-intl php-mysqli php-xsl php-soap php-opcache php-odbc
    Error: error building at STEP "RUN yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y     && yum install php php-gd php-intl php-mysqli php-xsl php-soap php-opcache php-odbc php-json freetds openssl -y": error while running runtime: exit status 1
    

    instead. So far I have not found a useful way of installing PHP 7.4 again. I wonder what has changed?

    by

    points

    Responses

    Red Hat
    © 2025 Red Hat, Inc.