Skip to content

Support building mysql on RHEL10#388

Merged
phracek merged 3 commits intomasterfrom
building_testing_rhel10
Jan 29, 2025
Merged

Support building mysql on RHEL10#388
phracek merged 3 commits intomasterfrom
building_testing_rhel10

Conversation

@phracek
Copy link
Copy Markdown
Member

@phracek phracek commented Jan 28, 2025

This pull request adds support for building and testing mysql-container on RHEL10 host.

The pull request is separated into two commits:

  • the first commit adds Dockerfile.rhel10 and fix chown to mysql:root
  • The second commit updates main README.md file

Update `chown` from `mysql.0` -> `mysql:root`

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Update also currently supported versions

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 28, 2025

Pull Request validation

Failed

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

Success

🟢 CI - All checks have passed

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 28, 2025

The difference between C10S and RHEL10 dockerfiles for version 8.4:

$  diff -u 8.4/Dockerfile.c10s 8.4/Dockerfile.rhel10
--- 8.4/Dockerfile.c10s 2025-01-28 08:41:13
+++ 8.4/Dockerfile.rhel10       2025-01-28 08:41:13
@@ -1,4 +1,4 @@
-FROM quay.io/sclorg/s2i-core-c10s:c10s
+FROM ubi10/s2i-core:latest

 # MySQL image for OpenShift.
 #
@@ -29,10 +29,10 @@
       io.openshift.expose-services="3306:mysql" \
       io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
       com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
-      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s" \
+      name="rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
-      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s:c10s" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306

Difference between RHEL9 and RHEL10 is:

$  diff -u 8.4/Dockerfile.c10s 8.4/Dockerfile.rhel10
--- 8.4/Dockerfile.c10s 2025-01-28 08:41:13
+++ 8.4/Dockerfile.rhel10       2025-01-28 08:41:13
@@ -1,4 +1,4 @@
-FROM quay.io/sclorg/s2i-core-c10s:c10s
+FROM ubi10/s2i-core:latest

 # MySQL image for OpenShift.
 #
@@ -29,10 +29,10 @@
       io.openshift.expose-services="3306:mysql" \
       io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
       com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
-      name="sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s" \
+      name="rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
-      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/$NAME-$MYSQL_SHORT_VERSION-c10s:c10s" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306
➜  mysql-container git:(building_testing_rhel10) diff -u 8.4/Dockerfile.rhel9 8.4/Dockerfile.rhel10
--- 8.4/Dockerfile.rhel9        2025-01-28 08:41:13
+++ 8.4/Dockerfile.rhel10       2025-01-28 08:41:13
@@ -1,4 +1,4 @@
-FROM ubi9/s2i-core
+FROM ubi10/s2i-core:latest

 # MySQL image for OpenShift.
 #
@@ -29,10 +29,10 @@
       io.openshift.expose-services="3306:mysql" \
       io.openshift.tags="database,mysql,mysql$MYSQL_SHORT_VERSION,mysql-$MYSQL_SHORT_VERSION" \
       com.redhat.component="$NAME-$MYSQL_SHORT_VERSION-container" \
-      name="rhel9/$NAME-$MYSQL_SHORT_VERSION" \
+      name="rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       version="1" \
       com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
-      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/$NAME-$MYSQL_SHORT_VERSION" \
+      usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel10/$NAME-$MYSQL_SHORT_VERSION" \
       maintainer="SoftwareCollections.org <sclorg@redhat.com>"

 EXPOSE 3306
@@ -40,8 +40,7 @@
 # This image must forever use UID 27 for mysql user so our volumes are
 # safe in the future. This should *never* change, the last test is there
 # to make sure of that.
-RUN yum -y module enable mysql:$MYSQL_VERSION && \
-    INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mysql-server" && \
+RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mysql-server procps-ng" && \
     dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
     rpm -V $INSTALL_PKGS && \
     dnf -y clean all --enablerepo='*' && \

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 28, 2025

[test]

@phracek phracek requested a review from ljavorsk January 28, 2025 08:22
@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 28, 2025

@FaramosCZ PTAL. Thanks

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 28, 2025

Testing Farm results

namecomposearchstatusstarted (UTC)timelogs
RHEL9 - 8.0RHEL-9.4.0-Nightlyx86_64✅ passed28.01.2025 12:11:3217min 49stest pipeline
CentOS Stream 10 - 8.4CentOS-Stream-10x86_64✅ passed28.01.2025 12:11:3610min 27stest pipeline
RHEL8 - 8.0RHEL-8.10.0-Nightlyx86_64✅ passed28.01.2025 12:11:3326min 52stest pipeline
RHEL10 - 8.4RHEL-10-Nightlyx86_64✅ passed28.01.2025 12:11:4418min 53stest pipeline
CentOS Stream 9 - 8.0CentOS-Stream-9x86_64✅ passed28.01.2025 12:11:3511min 33stest pipeline
Fedora - 8.0Fedora-latestx86_64✅ passed28.01.2025 12:11:3213min 14stest pipeline

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

phracek commented Jan 28, 2025

RPM names was changed to versioned.

[test]

@phracek
Copy link
Copy Markdown
Member Author

phracek commented Jan 29, 2025

@FaramosCZ based on the comments, I guess, we can approve it.

@phracek phracek merged commit 16100b0 into master Jan 29, 2025
@phracek phracek deleted the building_testing_rhel10 branch January 29, 2025 11:18
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