From 2e813f9e45c63baa9b14a740e1d1e8c388454400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=87=A3=E8=B6=85?= <517024110@qq.com> Date: Thu, 31 Jul 2025 11:43:17 +0800 Subject: [PATCH] feat(kibana): Support i18n.locale via I18N_LOCALE env var Adds logic to the kibana-docker startup script to check for the I18N_LOCALE environment variable. If the variable is set, its value is used to configure the i18n.locale setting in kibana.yml, allowing users to set the UI language dynamically at container startup. --- kibana/Dockerfile | 1 + kibana/bin/kibana-docker | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/kibana/Dockerfile b/kibana/Dockerfile index 55b4377..98e38dd 100644 --- a/kibana/Dockerfile +++ b/kibana/Dockerfile @@ -86,6 +86,7 @@ WORKDIR /usr/share/kibana RUN ln -s /usr/share/kibana /opt/kibana ENV ELASTIC_CONTAINER true +ENV I18N_LOCALE "en" ENV PATH=/usr/share/kibana/bin:$PATH # Set some Kibana configuration defaults. diff --git a/kibana/bin/kibana-docker b/kibana/bin/kibana-docker index f4ae377..943326d 100755 --- a/kibana/bin/kibana-docker +++ b/kibana/bin/kibana-docker @@ -456,6 +456,10 @@ done # Files created at run-time should be group-writable, for Openshift's sake. umask 0002 +if [[ -n "$I18N_LOCALE" ]]; then + echo "i18n.locale: $I18N_LOCALE" >> /usr/share/kibana/config/kibana.yml +fi + # The virtual file /proc/self/cgroup should list the current cgroup # membership. For each hierarchy, you can follow the cgroup path from # this file to the cgroup filesystem (usually /sys/fs/cgroup/) and