From 307b5ff2b5cb777c55d0edad75d1d22a43829a03 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 6 Jun 2024 17:49:41 +1000 Subject: [PATCH] ubi: docker.cnf to match Ubuntu versions Also when building, ensure that the docker.cnf is readonly otherwise it won't be read by the server. --- 10.11-ubi/Dockerfile | 2 +- 10.11-ubi/docker.cnf | 5 +++++ 10.6-ubi/Dockerfile | 2 +- 10.6-ubi/docker.cnf | 5 +++++ 11.4-ubi/Dockerfile | 2 +- 11.4-ubi/docker.cnf | 5 +++++ 11.5-ubi/Dockerfile | 4 ++-- 11.5-ubi/docker.cnf | 5 +++++ Dockerfile-ubi.template | 2 +- docker.cnf | 6 ++++++ update.sh | 6 +++++- versions.json | 2 +- 12 files changed, 38 insertions(+), 8 deletions(-) diff --git a/10.11-ubi/Dockerfile b/10.11-ubi/Dockerfile index 0483d786..272ae5fb 100644 --- a/10.11-ubi/Dockerfile +++ b/10.11-ubi/Dockerfile @@ -28,7 +28,7 @@ RUN set -eux; \ gosu --version; \ gosu nobody true -COPY docker.cnf /etc/my.cnf.d/ +COPY --chmod=0644 docker.cnf /etc/my.cnf.d/ COPY MariaDB.repo /etc/yum.repos.d/ diff --git a/10.11-ubi/docker.cnf b/10.11-ubi/docker.cnf index eb426d06..978fe6d7 100644 --- a/10.11-ubi/docker.cnf +++ b/10.11-ubi/docker.cnf @@ -4,6 +4,11 @@ host-cache-size=0 skip-name-resolve +expire_logs_days=10 +character-set-server=utf8mb4 + +collation-server=utf8mb4_general_ci # 10* + [client-server] socket=/run/mariadb/mariadb.sock diff --git a/10.6-ubi/Dockerfile b/10.6-ubi/Dockerfile index d4dc7251..eaf6b179 100644 --- a/10.6-ubi/Dockerfile +++ b/10.6-ubi/Dockerfile @@ -28,7 +28,7 @@ RUN set -eux; \ gosu --version; \ gosu nobody true -COPY docker.cnf /etc/my.cnf.d/ +COPY --chmod=0644 docker.cnf /etc/my.cnf.d/ COPY MariaDB.repo /etc/yum.repos.d/ diff --git a/10.6-ubi/docker.cnf b/10.6-ubi/docker.cnf index eb426d06..978fe6d7 100644 --- a/10.6-ubi/docker.cnf +++ b/10.6-ubi/docker.cnf @@ -4,6 +4,11 @@ host-cache-size=0 skip-name-resolve +expire_logs_days=10 +character-set-server=utf8mb4 + +collation-server=utf8mb4_general_ci # 10* + [client-server] socket=/run/mariadb/mariadb.sock diff --git a/11.4-ubi/Dockerfile b/11.4-ubi/Dockerfile index 6a367f7e..6ec10217 100644 --- a/11.4-ubi/Dockerfile +++ b/11.4-ubi/Dockerfile @@ -28,7 +28,7 @@ RUN set -eux; \ gosu --version; \ gosu nobody true -COPY docker.cnf /etc/my.cnf.d/ +COPY --chmod=0644 docker.cnf /etc/my.cnf.d/ COPY MariaDB.repo /etc/yum.repos.d/ diff --git a/11.4-ubi/docker.cnf b/11.4-ubi/docker.cnf index eb426d06..f3af00a0 100644 --- a/11.4-ubi/docker.cnf +++ b/11.4-ubi/docker.cnf @@ -4,6 +4,11 @@ host-cache-size=0 skip-name-resolve +expire_logs_days=10 +character-set-server=utf8mb4 + +character-set-collations=utf8mb4=uca1400_ai_ci # 11.3+ + [client-server] socket=/run/mariadb/mariadb.sock diff --git a/11.5-ubi/Dockerfile b/11.5-ubi/Dockerfile index f9e272e1..ffc3aebc 100644 --- a/11.5-ubi/Dockerfile +++ b/11.5-ubi/Dockerfile @@ -28,7 +28,7 @@ RUN set -eux; \ gosu --version; \ gosu nobody true -COPY docker.cnf /etc/my.cnf.d/ +COPY --chmod=0644 docker.cnf /etc/my.cnf.d/ COPY MariaDB.repo /etc/yum.repos.d/ @@ -56,7 +56,7 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ # bashbrew-architectures: amd64 arm64v8 ppc64le s390x ARG MARIADB_VERSION=11.5.1 # release-status:RC -# release-support-type:Short Term Support +# release-support-type:Rolling # (https://downloads.mariadb.org/rest-api/mariadb/) # missing pwgen(epel), jemalloc(epel) (as entrypoint/user extensions) diff --git a/11.5-ubi/docker.cnf b/11.5-ubi/docker.cnf index eb426d06..f3af00a0 100644 --- a/11.5-ubi/docker.cnf +++ b/11.5-ubi/docker.cnf @@ -4,6 +4,11 @@ host-cache-size=0 skip-name-resolve +expire_logs_days=10 +character-set-server=utf8mb4 + +character-set-collations=utf8mb4=uca1400_ai_ci # 11.3+ + [client-server] socket=/run/mariadb/mariadb.sock diff --git a/Dockerfile-ubi.template b/Dockerfile-ubi.template index 807d9b76..ab6e6052 100644 --- a/Dockerfile-ubi.template +++ b/Dockerfile-ubi.template @@ -28,7 +28,7 @@ RUN set -eux; \ gosu --version; \ gosu nobody true -COPY docker.cnf /etc/my.cnf.d/ +COPY --chmod=0644 docker.cnf /etc/my.cnf.d/ COPY MariaDB.repo /etc/yum.repos.d/ diff --git a/docker.cnf b/docker.cnf index eb426d06..ba96c9cd 100644 --- a/docker.cnf +++ b/docker.cnf @@ -4,6 +4,12 @@ host-cache-size=0 skip-name-resolve +expire_logs_days=10 +character-set-server=utf8mb4 + +character-set-collations=utf8mb4=uca1400_ai_ci # 11.3+ +collation-server=utf8mb4_general_ci # 10* + [client-server] socket=/run/mariadb/mariadb.sock diff --git a/update.sh b/update.sh index 6a0172ee..be05409f 100755 --- a/update.sh +++ b/update.sh @@ -49,7 +49,11 @@ update_version() else suite= fullVersion=$mariaVersion - cp docker.cnf "$dir" + if [[ $version = 10.* ]]; then + sed -e '/character-set-collations/d' docker.cnf > "$dir/docker.cnf" + else + sed -e '/collation-server/d' docker.cnf > "$dir/docker.cnf" + fi sed -e "s!%%MARIADB_VERSION%%!${version%-*}!" MariaDB-ubi.repo > "$dir"/MariaDB.repo fi diff --git a/versions.json b/versions.json index 5800e9b4..fb8955dc 100644 --- a/versions.json +++ b/versions.json @@ -171,7 +171,7 @@ "version": "11.5.1", "fullVersion": "11.5.1", "releaseStatus": "RC", - "supportType": "Short Term Support", + "supportType": "Rolling", "base": "ubi9", "arches": [ "amd64",