-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
38 lines (33 loc) · 1.63 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM mysql:8.0.40-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.0 \
mroonga_version=14.10
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.0-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.0.40 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"]