Skip to content

Commit

Permalink
ubi: docker.cnf to match Ubuntu versions
Browse files Browse the repository at this point in the history
Also when building, ensure that the docker.cnf
is readonly otherwise it won't be read by the server.
  • Loading branch information
grooverdan committed Jun 6, 2024
1 parent eac33f6 commit be4d377
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 4 deletions.
2 changes: 2 additions & 0 deletions 10.11-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ RUN set -eux; \

COPY docker.cnf /etc/my.cnf.d/

RUN chown 0644 /etc/my.cnf.d/docker.cnf

COPY MariaDB.repo /etc/yum.repos.d/

# HasRequiredLabel requirement from Red Hat OpenShift Software Certification
Expand Down
5 changes: 5 additions & 0 deletions 10.11-ubi/docker.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions 10.6-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ RUN set -eux; \

COPY docker.cnf /etc/my.cnf.d/

RUN chown 0644 /etc/my.cnf.d/docker.cnf

COPY MariaDB.repo /etc/yum.repos.d/

# HasRequiredLabel requirement from Red Hat OpenShift Software Certification
Expand Down
5 changes: 5 additions & 0 deletions 10.6-ubi/docker.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions 11.4-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ RUN set -eux; \

COPY docker.cnf /etc/my.cnf.d/

RUN chown 0644 /etc/my.cnf.d/docker.cnf

COPY MariaDB.repo /etc/yum.repos.d/

# HasRequiredLabel requirement from Red Hat OpenShift Software Certification
Expand Down
5 changes: 5 additions & 0 deletions 11.4-ubi/docker.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion 11.5-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ RUN set -eux; \

COPY docker.cnf /etc/my.cnf.d/

RUN chown 0644 /etc/my.cnf.d/docker.cnf

COPY MariaDB.repo /etc/yum.repos.d/

# HasRequiredLabel requirement from Red Hat OpenShift Software Certification
Expand All @@ -56,7 +58,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)
Expand Down
5 changes: 5 additions & 0 deletions 11.5-ubi/docker.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ubi.template
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
6 changes: 6 additions & 0 deletions docker.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"version": "11.5.1",
"fullVersion": "11.5.1",
"releaseStatus": "RC",
"supportType": "Short Term Support",
"supportType": "Rolling",
"base": "ubi9",
"arches": [
"amd64",
Expand Down

0 comments on commit be4d377

Please sign in to comment.