From ce48f0322686ad0a3d12c509a4ace6b12b36754f Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 25 Oct 2023 09:43:51 +0200 Subject: [PATCH] Add a test in Dockerfile directly to check httpd version Otherwise when a wrong stream is installed, it's only found by scl test, which is too late in the process. Signed-off-by: Petr "Stone" Hracek --- 2.4-micro/Dockerfile.c8s | 1 + 2.4-micro/Dockerfile.c9s | 1 + 2.4-micro/Dockerfile.fedora | 1 + 2.4/Dockerfile | 1 + 2.4/Dockerfile.fedora | 1 + 2.4/Dockerfile.rhel7 | 1 + 2.4/Dockerfile.rhel8 | 1 + 2.4/Dockerfile.rhel9 | 1 + 8 files changed, 8 insertions(+) diff --git a/2.4-micro/Dockerfile.c8s b/2.4-micro/Dockerfile.c8s index ce411010..b80ad682 100644 --- a/2.4-micro/Dockerfile.c8s +++ b/2.4-micro/Dockerfile.c8s @@ -69,6 +69,7 @@ WORKDIR ${HOME} RUN useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \ -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ /usr/libexec/httpd-prepare USER 1001 diff --git a/2.4-micro/Dockerfile.c9s b/2.4-micro/Dockerfile.c9s index 85f19464..22a5d09e 100644 --- a/2.4-micro/Dockerfile.c9s +++ b/2.4-micro/Dockerfile.c9s @@ -68,6 +68,7 @@ WORKDIR ${HOME} RUN useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \ -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ /usr/libexec/httpd-prepare USER 1001 diff --git a/2.4-micro/Dockerfile.fedora b/2.4-micro/Dockerfile.fedora index c97d7768..75162591 100644 --- a/2.4-micro/Dockerfile.fedora +++ b/2.4-micro/Dockerfile.fedora @@ -68,6 +68,7 @@ WORKDIR ${HOME} RUN useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \ -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ /usr/libexec/httpd-prepare USER 1001 diff --git a/2.4/Dockerfile b/2.4/Dockerfile index 07445c47..0a6d1c21 100644 --- a/2.4/Dockerfile +++ b/2.4/Dockerfile @@ -37,6 +37,7 @@ RUN yum install -y yum-utils && \ INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd24 httpd24-mod_ssl httpd24-mod_ldap httpd24-mod_session httpd24-mod_auth_mellon httpd24-mod_security openssl" && \ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + scl enable httpd24 -- httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ yum -y clean all --enablerepo='*' ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ diff --git a/2.4/Dockerfile.fedora b/2.4/Dockerfile.fedora index c8e40b72..346ffb8f 100644 --- a/2.4/Dockerfile.fedora +++ b/2.4/Dockerfile.fedora @@ -38,6 +38,7 @@ RUN dnf install -y yum-utils gettext hostname && \ INSTALL_PKGS="nss_wrapper bind-utils httpd mod_ssl mod_ldap mod_session mod_security sscg" && \ dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ dnf clean all ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ diff --git a/2.4/Dockerfile.rhel7 b/2.4/Dockerfile.rhel7 index 16497a19..c22e836e 100644 --- a/2.4/Dockerfile.rhel7 +++ b/2.4/Dockerfile.rhel7 @@ -38,6 +38,7 @@ RUN yum install -y yum-utils && \ INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd24 httpd24-mod_ssl httpd24-mod_ldap httpd24-mod_session httpd24-mod_auth_mellon httpd24-mod_security openssl" && \ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + scl enable httpd24 -- httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ yum -y clean all --enablerepo='*' ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ diff --git a/2.4/Dockerfile.rhel8 b/2.4/Dockerfile.rhel8 index f5042406..19421885 100644 --- a/2.4/Dockerfile.rhel8 +++ b/2.4/Dockerfile.rhel8 @@ -37,6 +37,7 @@ RUN yum -y module enable httpd:$HTTPD_VERSION && \ INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" && \ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ yum -y clean all --enablerepo='*' ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ diff --git a/2.4/Dockerfile.rhel9 b/2.4/Dockerfile.rhel9 index 27c6a234..fb3b44bb 100644 --- a/2.4/Dockerfile.rhel9 +++ b/2.4/Dockerfile.rhel9 @@ -36,6 +36,7 @@ EXPOSE 8443 RUN INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" && \ yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ yum -y clean all --enablerepo='*' ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \