Skip to content

Conversation

phracek
Copy link
Member

@phracek phracek commented Jul 29, 2024

This pull request contains three updates.

  • Adds Dockerfile.c10s for building and testing mariadb-container
  • Updates README's
  • Update build-and-push action

phracek added 4 commits July 29, 2024 12:40
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Update Dockerfile.fedora against Dockerfile.c10s so that they
are a bit more closer

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek
Copy link
Member Author

phracek commented Jul 29, 2024

[test]

Copy link

github-actions bot commented Jul 29, 2024

Pull Request validation

Success

🟢 CI - All checks have passed
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟢 Pull Request meet requirements, mergeable_state is clean
🟢 Pull Request has correct target branch master
🟢 Pull Request was merged

@phracek
Copy link
Member Author

phracek commented Jul 29, 2024

Differences between Dockerfiles.

Diff between 1.26/Dockerfile.fedora and 1.26/Dockerfile.c10s:

$ diff -u 1.26/Dockerfile.fedora 1.26/Dockerfile.c10s
--- 1.26/Dockerfile.fedora	2024-07-29 12:41:25
+++ 1.26/Dockerfile.c10s	2024-07-29 12:38:30
@@ -1,14 +1,12 @@
-FROM quay.io/fedora/s2i-core:40
+FROM quay.io/sclorg/s2i-core-c10s:c10s

-
 EXPOSE 8080
 EXPOSE 8443

 ENV NAME=nginx \
     NGINX_VERSION=1.26 \
     NGINX_SHORT_VER=126 \
-    VERSION=0 \
-    ARCH=x86_64
+    VERSION=0

 ENV SUMMARY="Platform for running nginx $NGINX_VERSION or building nginx-based application" \
     DESCRIPTION="Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP \
@@ -24,12 +22,13 @@
       io.openshift.expose-services="8080:http" \
       io.openshift.expose-services="8443:https" \
       io.openshift.tags="builder,${NAME},${NAME}-${NGINX_SHORT_VER}" \
-      com.redhat.component="${NAME}-${NGINX_SHORT_VER}" \
-      name="fedora/${NAME}-${NGINX_SHORT_VER}" \
-      version="${VERSION}" \
+      com.redhat.component="${NAME}-${NGINX_SHORT_VER}-container" \
+      name="sclorg/${NAME}-${NGINX_SHORT_VER}-c10s" \
+      version="1" \
+      com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
       help="For more information visit https://github.com/sclorg/${NAME}-container" \
-      usage="s2i build <SOURCE-REPOSITORY> ${FGC}/nginx <APP-NAME>"
+      usage="s2i build <SOURCE-REPOSITORY> quay.io/sclorg/${NAME}-${NGINX_SHORT_VER}-c10s:latest <APP-NAME>"

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

-RUN dnf install -y gettext hostname && \
-    INSTALL_PKGS="nss_wrapper bind-utils nginx nginx-mod-stream nginx-mod-http-perl" && \
+# Modules does not exist
+RUN INSTALL_PKGS="nss_wrapper 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" && \
-    dnf clean all
+    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

Diff between 1.26/Dockerfile.c9s and 1.26/Dockerfile.c10s:

$ diff -u 1.26/Dockerfile.c9s 1.26/Dockerfile.c10s
--- 1.26/Dockerfile.c9s	2024-07-02 09:23:20
+++ 1.26/Dockerfile.c10s	2024-07-29 12:38:30
@@ -1,4 +1,4 @@
-FROM quay.io/sclorg/s2i-core-c9s:c9s
+FROM quay.io/sclorg/s2i-core-c10s:c10s

 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}-c9s" \
+      name="sclorg/${NAME}-${NGINX_SHORT_VER}-c10s" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
       help="For more information visit https://github.com/sclorg/${NAME}-container" \
-      usage="s2i build <SOURCE-REPOSITORY> quay.io/sclorg/${NAME}-${NGINX_SHORT_VER}-c9s:latest <APP-NAME>"
+      usage="s2i build <SOURCE-REPOSITORY> quay.io/sclorg/${NAME}-${NGINX_SHORT_VER}-c10s:latest <APP-NAME>"

 ENV NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
     NGINX_CONF_PATH=/etc/nginx/nginx.conf \
@@ -39,12 +39,11 @@
     NGINX_PERL_MODULE_PATH=${APP_ROOT}/etc/perl

 # Modules does not exist
-RUN yum -y module enable nginx:$NGINX_VERSION && \
-    INSTALL_PKGS="nss_wrapper bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl" && \
-    yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
+RUN INSTALL_PKGS="nss_wrapper 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

Diff between 1.26/Dockerfile.rhel9 and 1.26/Dockerfile.c10s:

$ diff -u 1.26/Dockerfile.rhel9 1.26/Dockerfile.c10s
--- 1.26/Dockerfile.rhel9	2024-07-02 09:23:20
+++ 1.26/Dockerfile.c10s	2024-07-29 12:38:30
@@ -1,4 +1,4 @@
-FROM ubi9/s2i-core:1
+FROM quay.io/sclorg/s2i-core-c10s:c10s

 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="sclorg/${NAME}-${NGINX_SHORT_VER}-c10s" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
       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> quay.io/sclorg/${NAME}-${NGINX_SHORT_VER}-c10s: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 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 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 Jul 29, 2024

Test passed locally for C10S:

==============================================
Tests were run for image quay.io/sclorg/nginx-126-c10s:1
==============================================
Test cases results:

 [PASSED] for 'test-app' test_s2i_usage (00:00:00)
 [PASSED] for 'test-app' test_docker_run_usage (00:00:01)
 [PASSED] for 'test-app' test_application (00:00:02)
 [PASSED] for 'test-app' test_log_output (00:00:02)
 [PASSED] for 'test-app' test_log_volume_output (00:00:02)
 [PASSED] for 'test-app' test_application_user (00:00:02)
 [PASSED] for 'start-hook-test-app' test_pre_init_script (00:00:02)
 [PASSED] for 'miscellaneous-tests' run_dockerfiles_test (00:00:15)

Tests for quay.io/sclorg/nginx-126-c10s:1 succeeded.

io.openshift.tags="builder,${NAME},${NAME}${NGINX_SHORT_VER}" \
com.redhat.component="${NAME}" \
io.openshift.tags="builder,${NAME},${NAME}-${NGINX_SHORT_VER}" \
com.redhat.component="${NAME}-${NGINX_SHORT_VER}" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended to differ from the C10S entry?
com.redhat.component="${NAME}-${NGINX_SHORT_VER}-container" \
vs
com.redhat.component="${NAME}-${NGINX_SHORT_VER}" \

Copy link
Member

@hhorak hhorak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All look good to me.

@github-actions github-actions bot merged commit 0532480 into master Aug 6, 2024
@github-actions github-actions bot deleted the support_c10s branch August 6, 2024 18:10
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.

3 participants