Skip to content

Commit a528869

Browse files
FaramosCZphracek
authored andcommitted
[syntax enhancement] Utilize the ${NAME} variable through the containerfile
WARNING: this introduces the ${NAME} environmental variable to the RHEL 9 and C9S variants !
1 parent c9719f5 commit a528869

7 files changed

+35
-31
lines changed

Diff for: 10.11/Dockerfile.c10s

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LABEL summary="${SUMMARY}" \
2727
io.k8s.description="${DESCRIPTION}" \
2828
io.k8s.display-name="MariaDB ${VERSION}" \
2929
io.openshift.expose-services="3306:mysql" \
30-
io.openshift.tags="database,mysql,mariadb,mariadb1011,mariadb-1011" \
30+
io.openshift.tags="database,mysql,${NAME},${NAME}1011,${NAME}-1011" \
3131
com.redhat.component="${NAME}-1011-container" \
3232
name="sclorg/${NAME}-1011-c10s" \
3333
version="1" \
@@ -39,7 +39,7 @@ EXPOSE 3306
3939
# This image must forever use UID 27 for mysql user so our volumes are
4040
# safe in the future. This should *never* change, the last test is there
4141
# to make sure of that.
42-
RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base mariadb-server" && \
42+
RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base ${NAME}-server" && \
4343
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4444
rpm -V ${INSTALL_PKGS} && \
4545
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.11/Dockerfile.c9s

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ FROM quay.io/sclorg/s2i-core-c9s:c9s
1313
ENV MYSQL_VERSION=10.11 \
1414
APP_DATA=/opt/app-root/src \
1515
HOME=/var/lib/mysql \
16+
NAME=mariadb \
1617
SUMMARY="MariaDB 10.11 SQL database server" \
1718
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
1819
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
@@ -24,20 +25,20 @@ LABEL summary="${SUMMARY}" \
2425
io.k8s.description="${DESCRIPTION}" \
2526
io.k8s.display-name="MariaDB 10.11" \
2627
io.openshift.expose-services="3306:mysql" \
27-
io.openshift.tags="database,mysql,mariadb,mariadb1011,mariadb-1011" \
28-
com.redhat.component="mariadb-1011-container" \
29-
name="sclorg/mariadb-1011-c9s" \
28+
io.openshift.tags="database,mysql,${NAME},${NAME}1011,${NAME}-1011" \
29+
com.redhat.component="${NAME}-1011-container" \
30+
name="sclorg/${NAME}-1011-c9s" \
3031
version="1" \
31-
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/mariadb-1011-c9s" \
32+
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/${NAME}-1011-c9s" \
3233
maintainer="SoftwareCollections.org <[email protected]>"
3334

3435
EXPOSE 3306
3536

3637
# This image must forever use UID 27 for mysql user so our volumes are
3738
# safe in the future. This should *never* change, the last test is there
3839
# to make sure of that.
39-
RUN yum -y module enable mariadb:${MYSQL_VERSION} && \
40-
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mariadb-server" && \
40+
RUN yum -y module enable ${NAME}:${MYSQL_VERSION} && \
41+
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base ${NAME}-server" && \
4142
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4243
rpm -V ${INSTALL_PKGS} && \
4344
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.11/Dockerfile.fedora

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LABEL summary="${SUMMARY}" \
2727
io.k8s.description="${DESCRIPTION}" \
2828
io.k8s.display-name="MariaDB ${VERSION}" \
2929
io.openshift.expose-services="3306:mysql" \
30-
io.openshift.tags="database,mysql,mariadb,mariadb1011,mariadb-1011" \
30+
io.openshift.tags="database,mysql,${NAME},${NAME}1011,${NAME}-1011" \
3131
com.redhat.component="${NAME}" \
3232
name="fedora/${NAME}-1011" \
3333
version="${VERSION}" \
@@ -39,7 +39,7 @@ EXPOSE 3306
3939
# This image must forever use UID 27 for mysql user so our volumes are
4040
# safe in the future. This should *never* change, the last test is there
4141
# to make sure of that.
42-
RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mariadb-server" && \
42+
RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base ${NAME}-server" && \
4343
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4444
rpm -V ${INSTALL_PKGS} && \
4545
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.11/Dockerfile.rhel10

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ LABEL summary="${SUMMARY}" \
2626
io.k8s.description="${DESCRIPTION}" \
2727
io.k8s.display-name="MariaDB ${VERSION}" \
2828
io.openshift.expose-services="3306:mysql" \
29-
io.openshift.tags="database,mysql,mariadb,mariadb1011,mariadb-1011" \
29+
io.openshift.tags="database,mysql,${NAME},${NAME}1011,${NAME}-1011" \
3030
com.redhat.component="${NAME}-1011-container" \
31-
name="rhel10/mariadb-1011" \
31+
name="rhel10/${NAME}-1011" \
3232
version="1" \
33-
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel10/mariadb-1011" \
33+
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel10/${NAME}-1011" \
3434
maintainer="SoftwareCollections.org <[email protected]>"
3535

3636
EXPOSE 3306
3737

3838
# This image must forever use UID 27 for mysql user so our volumes are
3939
# safe in the future. This should *never* change, the last test is there
4040
# to make sure of that.
41-
RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base mariadb-server" && \
41+
RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff-base ${NAME}-server" && \
4242
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4343
rpm -V ${INSTALL_PKGS} && \
4444
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.11/Dockerfile.rhel9

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ FROM ubi9/s2i-core
1313
ENV MYSQL_VERSION=10.11 \
1414
APP_DATA=/opt/app-root/src \
1515
HOME=/var/lib/mysql \
16+
NAME=mariadb \
1617
SUMMARY="MariaDB 10.11 SQL database server" \
1718
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
1819
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
@@ -24,20 +25,20 @@ LABEL summary="${SUMMARY}" \
2425
io.k8s.description="${DESCRIPTION}" \
2526
io.k8s.display-name="MariaDB 10.11" \
2627
io.openshift.expose-services="3306:mysql" \
27-
io.openshift.tags="database,mysql,mariadb,mariadb1011,mariadb-1011" \
28-
com.redhat.component="mariadb-1011-container" \
29-
name="rhel9/mariadb-1011" \
28+
io.openshift.tags="database,mysql,${NAME},${NAME}1011,${NAME}-1011" \
29+
com.redhat.component="${NAME}-1011-container" \
30+
name="rhel9/${NAME}-1011" \
3031
version="1" \
31-
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/mariadb-1011" \
32+
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/${NAME}-1011" \
3233
maintainer="SoftwareCollections.org <[email protected]>"
3334

3435
EXPOSE 3306
3536

3637
# This image must forever use UID 27 for mysql user so our volumes are
3738
# safe in the future. This should *never* change, the last test is there
3839
# to make sure of that.
39-
RUN yum -y module enable mariadb:${MYSQL_VERSION} && \
40-
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind9.18-utils groff-base mariadb-server" && \
40+
RUN yum -y module enable ${NAME}:${MYSQL_VERSION} && \
41+
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind9.18-utils groff-base ${NAME}-server" && \
4142
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4243
rpm -V ${INSTALL_PKGS} && \
4344
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.5/Dockerfile.c9s

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ FROM quay.io/sclorg/s2i-core-c9s:c9s
1313
ENV MYSQL_VERSION=10.5 \
1414
APP_DATA=/opt/app-root/src \
1515
HOME=/var/lib/mysql \
16+
NAME=mariadb \
1617
SUMMARY="MariaDB 10.5 SQL database server" \
1718
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
1819
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
@@ -24,20 +25,20 @@ LABEL summary="${SUMMARY}" \
2425
io.k8s.description="${DESCRIPTION}" \
2526
io.k8s.display-name="MariaDB 10.5" \
2627
io.openshift.expose-services="3306:mysql" \
27-
io.openshift.tags="database,mysql,mariadb,mariadb105,mariadb-105" \
28-
com.redhat.component="mariadb-105-container" \
29-
name="sclorg/mariadb-105-c9s" \
28+
io.openshift.tags="database,mysql,${NAME},${NAME}105,${NAME}-105" \
29+
com.redhat.component="${NAME}-105-container" \
30+
name="sclorg/${NAME}-105-c9s" \
3031
version="1" \
31-
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/mariadb-105-c9s" \
32+
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 quay.io/sclorg/${NAME}-105-c9s" \
3233
maintainer="SoftwareCollections.org <[email protected]>"
3334

3435
EXPOSE 3306
3536

3637
# This image must forever use UID 27 for mysql user so our volumes are
3738
# safe in the future. This should *never* change, the last test is there
3839
# to make sure of that.
39-
RUN yum -y module disable mariadb && \
40-
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base mariadb-server" && \
40+
RUN yum -y module disable ${NAME} && \
41+
INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind-utils groff-base ${NAME}-server" && \
4142
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4243
rpm -V ${INSTALL_PKGS} && \
4344
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

Diff for: 10.5/Dockerfile.rhel9

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ FROM ubi9/s2i-core
1313
ENV MYSQL_VERSION=10.5 \
1414
APP_DATA=/opt/app-root/src \
1515
HOME=/var/lib/mysql \
16+
NAME=mariadb \
1617
SUMMARY="MariaDB 10.5 SQL database server" \
1718
DESCRIPTION="MariaDB is a multi-user, multi-threaded SQL database server. The container \
1819
image provides a containerized packaging of the MariaDB mysqld daemon and client application. \
@@ -24,19 +25,19 @@ LABEL summary="${SUMMARY}" \
2425
io.k8s.description="${DESCRIPTION}" \
2526
io.k8s.display-name="MariaDB 10.5" \
2627
io.openshift.expose-services="3306:mysql" \
27-
io.openshift.tags="database,mysql,mariadb,mariadb105,mariadb-105" \
28-
com.redhat.component="mariadb-105-container" \
29-
name="rhel9/mariadb-105" \
28+
io.openshift.tags="database,mysql,${NAME},${NAME}105,${NAME}-105" \
29+
com.redhat.component="${NAME}-105-container" \
30+
name="rhel9/${NAME}-105" \
3031
version="1" \
31-
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/mariadb-105" \
32+
usage="podman run -d -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 rhel9/${NAME}-105" \
3233
maintainer="SoftwareCollections.org <[email protected]>"
3334

3435
EXPOSE 3306
3536

3637
# This image must forever use UID 27 for mysql user so our volumes are
3738
# safe in the future. This should *never* change, the last test is there
3839
# to make sure of that.
39-
RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind9.18-utils groff-base mariadb-server" && \
40+
RUN INSTALL_PKGS="policycoreutils rsync tar gettext hostname bind9.18-utils groff-base ${NAME}-server" && \
4041
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
4142
rpm -V ${INSTALL_PKGS} && \
4243
/usr/libexec/mysqld -V | grep -qe "${MYSQL_VERSION}\." && echo "Found VERSION ${MYSQL_VERSION}" && \

0 commit comments

Comments
 (0)