Skip to content

Commit

Permalink
Add a test in Dockerfile directly to check httpd version
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phracek committed Oct 25, 2023
1 parent bd0a0c6 commit ce48f03
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions 2.4-micro/Dockerfile.c8s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 2.4-micro/Dockerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 2.4-micro/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions 2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down
1 change: 1 addition & 0 deletions 2.4/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down
1 change: 1 addition & 0 deletions 2.4/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down
1 change: 1 addition & 0 deletions 2.4/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down
1 change: 1 addition & 0 deletions 2.4/Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down

0 comments on commit ce48f03

Please sign in to comment.