Skip to content

Commit

Permalink
Add support for MySQL 8.4 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
komainu8 authored Jan 29, 2025
1 parent 0c31411 commit 0063077
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
matrix:
id:
- "mysql-8.0"
- "mysql-8.4"
steps:
- name: Parse ID
id: parse
Expand Down
38 changes: 38 additions & 0 deletions mysql-8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM mysql:8.4.4-oraclelinux9

# TODO
# Remove `--setopt=apache-arrow-almalinux.gpgcheck=0` option.
# It is specified because the installation fails with the following error.
# ```
# (microdnf:544): libdnf-WARNING **: 04:37:39.459: failed to parse public key for /etc/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
# error: failed to parse public key for /var/cache/yum/metadata/apache-arrow-almalinux-9-x86_64/RPM-GPG-KEY-Apache-Arrow
# ```

ENV groonga_version=14.1.3 \
mroonga_version=14.13

RUN mkdir -p /etc/mysql/mysql.conf.d && \
touch /etc/mysql/mysql.conf.d/default-auth-override.cnf && \
touch /etc/mysql/mysql.conf.d/lowercase-table-names.cnf && \
microdnf install -y \
'dnf-command(config-manager)' \
epel-release && \
rpm -i https://packages.groonga.org/almalinux/9/groonga-release-latest.noarch.rpm && \
rpm -i https://apache.jfrog.io/artifactory/arrow/almalinux/9/apache-arrow-release-latest.rpm && \
microdnf install -y \
--setopt=apache-arrow-almalinux.gpgcheck=0 \
groonga-tokenizer-mecab-${groonga_version}-1.el9.x86_64 \
mysql-community-minimal-8.4-mroonga-${mroonga_version}-1.el9.x86_64 && \
microdnf clean all

RUN mkdir -p /docker-entrypoint-mroonga-initdb.d && \
cp /usr/share/mroonga/install.sql \
/docker-entrypoint-mroonga-initdb.d/00-install.sql && \
sed \
-i'' \
-e 's,docker_process_init_files /,docker_process_init_files /docker-entrypoint-mroonga-initdb.d/* /,g' \
/usr/local/bin/docker-entrypoint.sh

# mysql:8.4.4 image has DB in /var/lib/mysql/.
# This clears /var/lib/mysql/ to ensure creating a new DB on "docker run".
VOLUME ["/var/lib/mysql"]

0 comments on commit 0063077

Please sign in to comment.