Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building and testing nginx-container on RHEL 10 #324

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

phracek
Copy link
Member

@phracek phracek commented Jan 14, 2025

This pull request supports building and testing nginx-container on RHEL 10 quest.

The first commit adds Dockerfile.rhel10 for building and testing.
The second commit updates README.md files

Copy link

github-actions bot commented Jan 14, 2025

Pull Request validation

Failed

🔴 Review - Missing review from a member (1 required)

Success

🟢 CI - All checks have passed

@phracek
Copy link
Member Author

phracek commented Jan 14, 2025

Difference between C10S and RHEL10 dockerfiles.

$ diff -u 1.26/Dockerfile.c10s 1.26/Dockerfile.rhel10
--- 1.26/Dockerfile.c10s	2024-09-25 08:05:42
+++ 1.26/Dockerfile.rhel10	2025-01-14 18:30:22
@@ -1,4 +1,4 @@
-FROM quay.io/sclorg/s2i-core-c10s:c10s
+FROM registry.stage.redhat.io/ubi10/s2i-core

 EXPOSE 8080
 EXPOSE 8443
@@ -23,12 +23,12 @@
       io.openshift.expose-services="8443:https" \
       io.openshift.tags="builder,${NAME},${NAME}-${NGINX_SHORT_VER}" \
       com.redhat.component="${NAME}-${NGINX_SHORT_VER}-container" \
-      name="sclorg/${NAME}-${NGINX_SHORT_VER}-c10s" \
+      name="rhel10/nginx-${NGINX_SHORT_VER}" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
       maintainer="SoftwareCollections.org <[email protected]>" \
       help="For more information visit https://github.com/sclorg/${NAME}-container" \
-      usage="s2i build <SOURCE-REPOSITORY> quay.io/sclorg/${NAME}-${NGINX_SHORT_VER}-c10s:latest <APP-NAME>"
+      usage="s2i build <SOURCE-REPOSITORY> rhel10/nginx-${NGINX_SHORT_VER}:latest <APP-NAME>"

 ENV NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
     NGINX_CONF_PATH=/etc/nginx/nginx.conf \

Difference between RHEL9 and RHEL10 Dockerfiles

$ diff -u 1.26/Dockerfile.rhel9 1.26/Dockerfile.rhel10
--- 1.26/Dockerfile.rhel9	2024-09-25 08:05:42
+++ 1.26/Dockerfile.rhel10	2025-01-14 18:30:22
@@ -1,4 +1,4 @@
-FROM ubi9/s2i-core:1
+FROM registry.stage.redhat.io/ubi10/s2i-core

 EXPOSE 8080
 EXPOSE 8443
@@ -23,12 +23,12 @@
       io.openshift.expose-services="8443:https" \
       io.openshift.tags="builder,${NAME},${NAME}-${NGINX_SHORT_VER}" \
       com.redhat.component="${NAME}-${NGINX_SHORT_VER}-container" \
-      name="ubi9/${NAME}-${NGINX_SHORT_VER}" \
+      name="rhel10/nginx-${NGINX_SHORT_VER}" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
       maintainer="SoftwareCollections.org <[email protected]>" \
       help="For more information visit https://github.com/sclorg/${NAME}-container" \
-      usage="s2i build <SOURCE-REPOSITORY> ubi9/${NAME}-${NGINX_SHORT_VER}:latest <APP-NAME>"
+      usage="s2i build <SOURCE-REPOSITORY> rhel10/nginx-${NGINX_SHORT_VER}:latest <APP-NAME>"

 ENV NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
     NGINX_CONF_PATH=/etc/nginx/nginx.conf \
@@ -38,12 +38,12 @@
     NGINX_LOG_PATH=/var/log/nginx \
     NGINX_PERL_MODULE_PATH=${APP_ROOT}/etc/perl

-RUN yum -y module enable nginx:$NGINX_VERSION && \
-    INSTALL_PKGS="nss_wrapper-libs bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl" && \
-    yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
+# Modules does not exist
+RUN INSTALL_PKGS="nss_wrapper-libs bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl" && \
+    dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
     rpm -V $INSTALL_PKGS && \
     nginx -v 2>&1 | grep -qe "nginx/$NGINX_VERSION\." && echo "Found VERSION $NGINX_VERSION" && \
-    yum -y clean all --enablerepo='*'
+    dnf -y clean all --enablerepo='*'

 # Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
 COPY $NGINX_VERSION/s2i/bin/ $STI_SCRIPTS_PATH

@phracek
Copy link
Member Author

phracek commented Jan 14, 2025

Let's try the first run

[test]

Copy link

github-actions bot commented Jan 14, 2025

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
CentOS Stream 10 - 1.26CentOS-Stream-10x86_64✅ passed22.01.2025 08:04:274min 12stest pipeline
CentOS Stream 9 - 1.22-microCentOS-Stream-9x86_64✅ passed22.01.2025 08:03:255min 16stest pipeline
CentOS Stream 9 - 1.24CentOS-Stream-9x86_64✅ passed22.01.2025 08:03:325min 47stest pipeline
RHEL10 - 1.26RHEL-10-Nightlyx86_64✅ passed22.01.2025 08:03:3612min 56stest pipeline
RHEL9 - Unsubscribed host - 1.20RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:2310min 57stest pipeline
RHEL9 - Unsubscribed host - 1.24RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:3611min 27stest pipeline
Fedora - 1.26Fedora-latestx86_64✅ passed22.01.2025 08:03:377min 46stest pipeline
RHEL9 - Unsubscribed host - 1.22RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:2511min 20stest pipeline
RHEL9 - 1.20RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:2712min 34stest pipeline
RHEL9 - 1.22RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:2711min 57stest pipeline
RHEL9 - 1.24RHEL-9.4.0-Nightlyx86_64✅ passed22.01.2025 08:03:3312min 45stest pipeline
RHEL8 - 1.22RHEL-8.10.0-Nightlyx86_64✅ passed22.01.2025 08:03:2415min 9stest pipeline
RHEL8 - 1.24RHEL-8.10.0-Nightlyx86_64✅ passed22.01.2025 08:03:3314min 50stest pipeline
RHEL8 - 1.22-microRHEL-8.10.0-Nightlyx86_64✅ passed22.01.2025 08:03:2715min 43stest pipeline

@phracek
Copy link
Member Author

phracek commented Jan 15, 2025

@uhliarik Please review it. Thanks

@phracek
Copy link
Member Author

phracek commented Jan 15, 2025

As far as I know only nginx-126 is affected.

Update image name also in usage

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Jan 16, 2025

Retest after changing image name from 'rhel10/nginx-' to 'ubi10/nginx-'

[test]

We do not need the full registry name

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Jan 22, 2025

[test]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant