From 3a0c058e5fe46fef0fdf64e519c0d4f9af2dc5f3 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 14 Jan 2025 12:14:58 +0100 Subject: [PATCH 1/7] Add Dockerfile.rhel10 to version 2.4 for building and testing RHEL10. Micro part is not supported on RHEL10 Signed-off-by: Petr "Stone" Hracek --- 2.4/Dockerfile.rhel10 | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 2.4/Dockerfile.rhel10 diff --git a/2.4/Dockerfile.rhel10 b/2.4/Dockerfile.rhel10 new file mode 100644 index 00000000..98e2ed7b --- /dev/null +++ b/2.4/Dockerfile.rhel10 @@ -0,0 +1,70 @@ +FROM registry.stage.redhat.io/ubi10/s2i-core + +# Apache HTTP Server image. +# +# Volumes: +# * /var/www - Datastore for httpd +# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set +# Environment: +# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24 + +ENV HTTPD_VERSION=2.4 \ + HTTPD_SHORT_VERSION=24 \ + NAME=httpd \ + ARCH=x86_64 + +ENV SUMMARY="Platform for running Apache httpd $HTTPD_VERSION or building httpd-based application" \ + DESCRIPTION="Apache httpd $HTTPD_VERSION available as container, is a powerful, efficient, \ +and extensible web server. Apache supports a variety of features, many implemented as compiled modules \ +which extend the core functionality. \ +These can range from server-side programming language support to authentication schemes. \ +Virtual hosting allows one Apache installation to serve many different Web sites." + +LABEL summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + io.k8s.display-name="Apache httpd $HTTPD_VERSION" \ + io.openshift.expose-services="8080:http,8443:https" \ + io.openshift.tags="builder,$NAME,$NAME-$HTTPD_SHORT_VERSION" \ + name="rhel10/httpd-24" \ + version="1" \ + com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \ + com.redhat.component="httpd-24-container" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ rhel10/httpd-24 sample-server" \ + maintainer="SoftwareCollections.org " + +EXPOSE 8080 +EXPOSE 8443 + +RUN INSTALL_PKGS="gettext hostname nss_wrapper-libs bind-utils httpd mod_ssl mod_ldap mod_session 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 -y clean all --enablerepo='*' + +ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ + HTTPD_APP_ROOT=${APP_ROOT} \ + HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \ + HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \ + HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \ + HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ + HTTPD_TLS_CERT_PATH=/etc/httpd/tls \ + HTTPD_VAR_RUN=/var/run/httpd \ + HTTPD_DATA_PATH=/var/www \ + HTTPD_DATA_ORIG_PATH=/var/www \ + HTTPD_LOG_PATH=/var/log/httpd + +COPY 2.4/s2i/bin/ $STI_SCRIPTS_PATH +COPY 2.4/root / + +# Reset permissions of filesystem to default values +RUN /usr/libexec/httpd-prepare && rpm-file-permissions + +USER 1001 + +# Not using VOLUME statement since it's not working in OpenShift Online: +# https://github.com/sclorg/httpd-container/issues/30 +# VOLUME ["${HTTPD_DATA_PATH}"] +# VOLUME ["${HTTPD_LOG_PATH}"] + +CMD ["/usr/bin/run-httpd"] From 4fa47ce474f2cb68a78591898978413872b86409 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 14 Jan 2025 12:15:41 +0100 Subject: [PATCH 2/7] Update README.md files with support RHEL10 Signed-off-by: Petr "Stone" Hracek --- 2.4/root/usr/share/container-scripts/httpd/README.md | 1 + README.md | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/2.4/root/usr/share/container-scripts/httpd/README.md b/2.4/root/usr/share/container-scripts/httpd/README.md index ede405ec..cd8b3962 100644 --- a/2.4/root/usr/share/container-scripts/httpd/README.md +++ b/2.4/root/usr/share/container-scripts/httpd/README.md @@ -245,6 +245,7 @@ Dockerfile and other sources for this container image are available on https://github.com/sclorg/httpd-container. In that repository, the Dockerfile for RHEL8 is called Dockerfile.rhel8, the Dockerfile for RHEL9 is called Dockerfile.rhel9, +the Dockerfile for RHEL10 is called Dockerfile.rhel10, the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, the Dockerfile for CentOS Stream 10 is called Dockerfile.c10s, and the Dockerfile for Fedora is called Dockerfile.fedora. diff --git a/README.md b/README.md index 68e54ffc..75ce80ef 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Apache HTTPD versions currently provided are: RHEL versions currently supported are: * RHEL 8 * RHEL 9 +* RHEL 10 CentOS Stream versions currently supported are: * CentOS Stream 9 @@ -32,7 +33,7 @@ CentOS Stream versions currently supported are: Installation ------------ -Choose either the CentOS Stream 9, CentOS Stream 10 or RHEL8 based image: +Choose either the CentOS Stream 9, CentOS Stream 10, RHEL8 based image, RHEL9 based image, or RHEL10 based image: * **RHEL8 based image** @@ -43,7 +44,7 @@ Choose either the CentOS Stream 9, CentOS Stream 10 or RHEL8 based image: $ podman pull registry.access.redhat.com/rhel8/httpd-24 ``` - To build a RHEL7 based Apache HTTP Server image, you need to run Docker build on a properly + To build a RHEL8 based Apache HTTP Server image, you need to run Docker build on a properly subscribed RHEL machine. ``` From a6428f37b2a47a3dbdacdf2320165e1b1a949210 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 14 Jan 2025 12:16:04 +0100 Subject: [PATCH 3/7] Update container-common-scripts to latest one. Signed-off-by: Petr "Stone" Hracek --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 956bbd38..1d0d2610 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 956bbd3888ccc038d497a863978084c868073c88 +Subproject commit 1d0d26106141ea319833145c1674558035c46a2f From d8ec20b0d1ca4b3256d61af3b5d0f7220128572c Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Wed, 15 Jan 2025 10:45:32 +0100 Subject: [PATCH 4/7] Use name ubi10 instead of rhel10 Co-authored-by: Petr Kubat --- 2.4/Dockerfile.rhel10 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.4/Dockerfile.rhel10 b/2.4/Dockerfile.rhel10 index 98e2ed7b..5fc4e20e 100644 --- a/2.4/Dockerfile.rhel10 +++ b/2.4/Dockerfile.rhel10 @@ -26,7 +26,7 @@ LABEL summary="$SUMMARY" \ io.k8s.display-name="Apache httpd $HTTPD_VERSION" \ io.openshift.expose-services="8080:http,8443:https" \ io.openshift.tags="builder,$NAME,$NAME-$HTTPD_SHORT_VERSION" \ - name="rhel10/httpd-24" \ + name="ubi10/httpd-24" \ version="1" \ com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \ com.redhat.component="httpd-24-container" \ From 7185fc03e41b78c0fefd1e8393cced474eb15f5b Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 15 Jan 2025 10:47:50 +0100 Subject: [PATCH 5/7] Use UBI license agreement in Dockerfile.c10s and Dockerfile.rhel10 Signed-off-by: Petr "Stone" Hracek --- 2.4/Dockerfile.c10s | 2 +- 2.4/Dockerfile.rhel10 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2.4/Dockerfile.c10s b/2.4/Dockerfile.c10s index 2f21e01c..f60401c9 100644 --- a/2.4/Dockerfile.c10s +++ b/2.4/Dockerfile.c10s @@ -28,7 +28,7 @@ LABEL summary="$SUMMARY" \ io.openshift.tags="builder,$NAME,$NAME-$HTTPD_SHORT_VERSION" \ name="sclorg/$NAME-$HTTPD_SHORT_VERSION-c10s" \ version="1" \ - com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \ + com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \ com.redhat.component="httpd-24-container" \ usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ quay.io/sclorg/$NAME-$HTTPD_SHORT_VERSION-c10s sample-server" \ maintainer="SoftwareCollections.org " diff --git a/2.4/Dockerfile.rhel10 b/2.4/Dockerfile.rhel10 index 5fc4e20e..2c5bc837 100644 --- a/2.4/Dockerfile.rhel10 +++ b/2.4/Dockerfile.rhel10 @@ -28,7 +28,7 @@ LABEL summary="$SUMMARY" \ io.openshift.tags="builder,$NAME,$NAME-$HTTPD_SHORT_VERSION" \ name="ubi10/httpd-24" \ version="1" \ - com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \ + com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \ com.redhat.component="httpd-24-container" \ usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ rhel10/httpd-24 sample-server" \ maintainer="SoftwareCollections.org " From 8778d2095555c3ea5c05bde7734a9de454efaf6b Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 16 Jan 2025 16:09:24 +0100 Subject: [PATCH 6/7] Changed to ubi10 from rhel10 Signed-off-by: Petr "Stone" Hracek --- 2.4/Dockerfile.rhel10 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.4/Dockerfile.rhel10 b/2.4/Dockerfile.rhel10 index 2c5bc837..cc9ba3ee 100644 --- a/2.4/Dockerfile.rhel10 +++ b/2.4/Dockerfile.rhel10 @@ -30,7 +30,7 @@ LABEL summary="$SUMMARY" \ version="1" \ com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \ com.redhat.component="httpd-24-container" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ rhel10/httpd-24 sample-server" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ubi10/httpd-24 sample-server" \ maintainer="SoftwareCollections.org " EXPOSE 8080 From 81a62d5c68ac71145e2c499251f5c5d0fccf2b9e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 21 Jan 2025 11:50:33 +0100 Subject: [PATCH 7/7] Use 'ubi10/s2i-core' instead of full registry name Signed-off-by: Petr "Stone" Hracek --- 2.4/Dockerfile.rhel10 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.4/Dockerfile.rhel10 b/2.4/Dockerfile.rhel10 index cc9ba3ee..23564e47 100644 --- a/2.4/Dockerfile.rhel10 +++ b/2.4/Dockerfile.rhel10 @@ -1,4 +1,4 @@ -FROM registry.stage.redhat.io/ubi10/s2i-core +FROM ubi10/s2i-core # Apache HTTP Server image. #