Skip to content

Commit

Permalink
Add a test in Dockerfile directly to check mysql version
Browse files Browse the repository at this point in the history
Otherwise when a wrong stream is installed, it's only found by scl test,
which is too late in the process.

Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek authored and zmiklank committed Oct 26, 2023
1 parent 57a31ec commit 5364e7f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.c8s
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down
3 changes: 2 additions & 1 deletion 8.0/Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ COPY 8.0/root /
# Also reset permissions of filesystem to default values
RUN rm -rf /etc/my.cnf.d/* && \
/usr/libexec/container-setup && \
rpm-file-permissions
rpm-file-permissions && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION"

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
Expand Down

0 comments on commit 5364e7f

Please sign in to comment.