Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ jobs:
tag: "fedora"
image_name: "mariadb-1011"

- dockerfile: "11.8/Dockerfile.fedora"
docker_context: "11.8"
registry_namespace: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
tag: "fedora"
image_name: "mariadb-118"


steps:
- name: Build and push to quay.io registry
uses: sclorg/build-and-push-action@v4
Expand Down
Empty file added 11.8/.exclude-c10s
Empty file.
Empty file added 11.8/.exclude-c9s
Empty file.
Empty file added 11.8/.exclude-rhel10
Empty file.
Empty file added 11.8/.exclude-rhel9
Empty file.
77 changes: 77 additions & 0 deletions 11.8/Dockerfile.c10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
FROM quay.io/sclorg/s2i-core-c10s:c10s

# MariaDB image for OpenShift.
#
# Volumes:
# * /var/lib/mysql/data - Datastore for MariaDB
# Environment:
# * $MYSQL_USER - Database user name
# * $MYSQL_PASSWORD - User's password
# * $MYSQL_DATABASE - Name of the database to create
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

# Standalone ENV call so these values can be re-used in the other ENV calls
ENV MYSQL_VERSION=11.8 \
MYSQL_SHORT_VERSION=118

ENV VERSION="${MYSQL_VERSION}" \
APP_DATA=/opt/app-root/src \
HOME=/var/lib/mysql \
NAME=mariadb \
ARCH=x86_64 \
SUMMARY="MariaDB ${MYSQL_VERSION} SQL database server" \
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
The mysqld server daemon accepts connections from clients and provides access to content from \
MariaDB databases on behalf of the clients."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="MariaDB ${MYSQL_VERSION}" \
io.openshift.expose-services="3306:mysql" \
io.openshift.tags="database,mysql,${NAME},${NAME}${MYSQL_SHORT_VERSION},${NAME}-${MYSQL_SHORT_VERSION}" \
com.redhat.component="${NAME}-${MYSQL_SHORT_VERSION}-container" \
name="sclorg/${NAME}-${MYSQL_SHORT_VERSION}-c10s" \
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" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

EXPOSE 3306

# 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 INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base" && \
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} ${NAME}${MYSQL_VERSION}-server && \
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \
dnf -y clean all --enablerepo='*' && \
mkdir -p ${HOME}/data && chown -R mysql:root ${HOME} && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
MYSQL_PREFIX=/usr

COPY ${MYSQL_VERSION}/root-common /
COPY ${MYSQL_VERSION}/s2i-common/bin/ ${STI_SCRIPTS_PATH}
COPY ${MYSQL_VERSION}/root /

# Hard links are not supported in Testing Farm approach during sync to guest
# operation system. Therefore tests are failing on error
# /usr/libexec/s2i/run no such file or directory
RUN ln -s /usr/bin/run-mysqld ${STI_SCRIPTS_PATH}/run

# this is needed due to issues with squash
# when this directory gets rm'd by the container-setup
# script.
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions

USER 27

ENTRYPOINT ["container-entrypoint"]
CMD ["run-mysqld"]
78 changes: 78 additions & 0 deletions 11.8/Dockerfile.c9s
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
FROM quay.io/sclorg/s2i-core-c9s:c9s

# MariaDB image for OpenShift.
#
# Volumes:
# * /var/lib/mysql/data - Datastore for MariaDB
# Environment:
# * $MYSQL_USER - Database user name
# * $MYSQL_PASSWORD - User's password
# * $MYSQL_DATABASE - Name of the database to create
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

# Standalone ENV call so these values can be re-used in the other ENV calls
ENV MYSQL_VERSION=11.8 \
MYSQL_SHORT_VERSION=118

ENV VERSION="${MYSQL_VERSION}" \
APP_DATA=/opt/app-root/src \
HOME=/var/lib/mysql \
NAME=mariadb \
SUMMARY="MariaDB ${MYSQL_VERSION} SQL database server" \
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
The mysqld server daemon accepts connections from clients and provides access to content from \
MariaDB databases on behalf of the clients."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="MariaDB ${MYSQL_VERSION}" \
io.openshift.expose-services="3306:mysql" \
io.openshift.tags="database,mysql,${NAME},${NAME}${MYSQL_SHORT_VERSION},${NAME}-${MYSQL_SHORT_VERSION}" \
com.redhat.component="${NAME}-${MYSQL_SHORT_VERSION}-container" \
name="sclorg/${NAME}-${MYSQL_SHORT_VERSION}-c9s" \
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}-c9s" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

EXPOSE 3306

# 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 ${NAME}:${MYSQL_VERSION} && \
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base ${NAME}-server" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
rpm -V ${INSTALL_PKGS} && \
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \
yum -y clean all --enablerepo='*' && \
mkdir -p ${HOME}/data && chown -R mysql:root ${HOME} && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
MYSQL_PREFIX=/usr

COPY ${MYSQL_VERSION}/root-common /
COPY ${MYSQL_VERSION}/s2i-common/bin/ ${STI_SCRIPTS_PATH}
COPY ${MYSQL_VERSION}/root /

# Hard links are not supported in Testing Farm approach during sync to guest
# operation system. Therefore tests are failing on error
# /usr/libexec/s2i/run no such file or directory
RUN ln -s /usr/bin/run-mysqld ${STI_SCRIPTS_PATH}/run

# this is needed due to issues with squash
# when this directory gets rm'd by the container-setup
# script.
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions

USER 27

ENTRYPOINT ["container-entrypoint"]
CMD ["run-mysqld"]
79 changes: 79 additions & 0 deletions 11.8/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
FROM quay.io/fedora/s2i-core:42

# MariaDB image for OpenShift.
#
# Volumes:
# * /var/lib/mysql/data - Datastore for MariaDB
# Environment:
# * $MYSQL_USER - Database user name
# * $MYSQL_PASSWORD - User's password
# * $MYSQL_DATABASE - Name of the database to create
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

# Standalone ENV call so these values can be re-used in the other ENV calls
ENV MYSQL_VERSION=11.8 \
MYSQL_SHORT_VERSION=118

ENV VERSION="${MYSQL_VERSION}" \
APP_DATA=/opt/app-root/src \
HOME=/var/lib/mysql \
NAME=mariadb \
ARCH=x86_64 \
SUMMARY="MariaDB ${MYSQL_VERSION} SQL database server" \
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
The mysqld server daemon accepts connections from clients and provides access to content from \
MariaDB databases on behalf of the clients."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="MariaDB ${MYSQL_VERSION}" \
io.openshift.expose-services="3306:mysql" \
io.openshift.tags="database,mysql,${NAME},${NAME}${MYSQL_SHORT_VERSION},${NAME}-${MYSQL_SHORT_VERSION}" \
com.redhat.component="${NAME}" \
name="fedora/${NAME}-${MYSQL_SHORT_VERSION}" \
version="${MYSQL_VERSION}" \
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/fedora/${NAME}-${MYSQL_SHORT_VERSION}" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

EXPOSE 3306

# This image must forever use UID 27 for mysql user so our volumes are safe in the future. This should *never* change.
# Instead of relying on the DB server package, we will do the setup ourselves before any package is installed
RUN /usr/sbin/groupadd -g 27 -o -r mysql && \
/usr/sbin/useradd -M -N -g mysql -o -r -d ${HOME} -s /sbin/nologin -c "MySQL Server" -u 27 mysql && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)" && \
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base" && \
dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False ${INSTALL_PKGS} ${NAME}${MYSQL_VERSION}-server && \
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \
dnf -y clean all --enablerepo='*' && \
mkdir -p ${HOME}/data && chown -R mysql:root ${HOME} && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
MYSQL_PREFIX=/usr


COPY ${MYSQL_VERSION}/root-common /
COPY ${MYSQL_VERSION}/s2i-common/bin/ ${STI_SCRIPTS_PATH}
COPY ${MYSQL_VERSION}/root /

# Hard links are not supported in Testing Farm approach during sync to guest
# operation system. Therefore tests are failing on error
# /usr/libexec/s2i/run no such file or directory
RUN ln -s /usr/bin/run-mysqld ${STI_SCRIPTS_PATH}/run

# this is needed due to issues with squash
# when this directory gets rm'd by the container-setup
# script.
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions

USER 27

ENTRYPOINT ["container-entrypoint"]
CMD ["run-mysqld"]
76 changes: 76 additions & 0 deletions 11.8/Dockerfile.rhel10
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM ubi10/s2i-core

# MariaDB image for OpenShift.
#
# Volumes:
# * /var/lib/mysql/data - Datastore for MariaDB
# Environment:
# * $MYSQL_USER - Database user name
# * $MYSQL_PASSWORD - User's password
# * $MYSQL_DATABASE - Name of the database to create
# * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

# Standalone ENV call so these values can be re-used in the other ENV calls
ENV MYSQL_VERSION=11.8 \
MYSQL_SHORT_VERSION=118

ENV VERSION="${MYSQL_VERSION}" \
APP_DATA=/opt/app-root/src \
HOME=/var/lib/mysql \
NAME=mariadb \
SUMMARY="MariaDB ${MYSQL_VERSION} SQL database server" \
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
The mysqld server daemon accepts connections from clients and provides access to content from \
MariaDB databases on behalf of the clients."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="MariaDB ${MYSQL_VERSION}" \
io.openshift.expose-services="3306:mysql" \
io.openshift.tags="database,mysql,${NAME},${NAME}${MYSQL_SHORT_VERSION},${NAME}-${MYSQL_SHORT_VERSION}" \
com.redhat.component="${NAME}-${MYSQL_SHORT_VERSION}-container" \
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 rhel10/${NAME}-${MYSQL_SHORT_VERSION}" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

EXPOSE 3306

# 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 INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base" && \
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} ${NAME}${MYSQL_VERSION}-server && \
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \
dnf -y clean all --enablerepo='*' && \
mkdir -p ${HOME}/data && chown -R mysql:root ${HOME} && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
MYSQL_PREFIX=/usr

COPY ${MYSQL_VERSION}/root-common /
COPY ${MYSQL_VERSION}/s2i-common/bin/ ${STI_SCRIPTS_PATH}
COPY ${MYSQL_VERSION}/root /

# Hard links are not supported in Testing Farm approach during sync to guest
# operation system. Therefore tests are failing on error
# /usr/libexec/s2i/run no such file or directory
RUN ln -s /usr/bin/run-mysqld ${STI_SCRIPTS_PATH}/run

# this is needed due to issues with squash
# when this directory gets rm'd by the container-setup
# script.
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions

USER 27

ENTRYPOINT ["container-entrypoint"]
CMD ["run-mysqld"]
Loading