From 3f30022956e420cfca1e65fb29a85fc329689f32 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Jan 2019 01:46:08 +0200 Subject: [PATCH] Fixed multilang support on CentOS based images --- web-apache-mysql/centos/Dockerfile | 3 +++ web-apache-pgsql/centos/Dockerfile | 3 +++ web-nginx-mysql/centos/Dockerfile | 3 +++ web-nginx-pgsql/centos/Dockerfile | 3 +++ zabbix-appliance/centos/Dockerfile | 3 +++ 5 files changed, 15 insertions(+) diff --git a/web-apache-mysql/centos/Dockerfile b/web-apache-mysql/centos/Dockerfile index bb3b9acef..247d75ea0 100644 --- a/web-apache-mysql/centos/Dockerfile +++ b/web-apache-mysql/centos/Dockerfile @@ -80,6 +80,9 @@ RUN groupadd --system zabbix && \ php-mysql \ php-xml && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ + cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'localedef -v -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ yum ${YUM_FLAGS_PERSISTANT} clean all && \ rm -rf /var/cache/yum/ diff --git a/web-apache-pgsql/centos/Dockerfile b/web-apache-pgsql/centos/Dockerfile index abf90ff69..c43afed80 100644 --- a/web-apache-pgsql/centos/Dockerfile +++ b/web-apache-pgsql/centos/Dockerfile @@ -81,6 +81,9 @@ RUN groupadd --system zabbix && \ php-xml \ postgresql && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ + cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'localedef -v -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ rm -rf /var/cache/yum/ diff --git a/web-nginx-mysql/centos/Dockerfile b/web-nginx-mysql/centos/Dockerfile index 0fa793a84..863fa4cc3 100644 --- a/web-nginx-mysql/centos/Dockerfile +++ b/web-nginx-mysql/centos/Dockerfile @@ -82,6 +82,9 @@ RUN groupadd --system zabbix && \ php-xml \ supervisor && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ + cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'localedef -v -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ rm -f /etc/php-fpm.d/www.conf && \ mkdir -p /var/lib/php/ && \ chown --quiet -R nginx:nginx /var/lib/php/ && \ diff --git a/web-nginx-pgsql/centos/Dockerfile b/web-nginx-pgsql/centos/Dockerfile index 737a05a73..809f9e25d 100644 --- a/web-nginx-pgsql/centos/Dockerfile +++ b/web-nginx-pgsql/centos/Dockerfile @@ -81,6 +81,9 @@ RUN groupadd --system zabbix && \ php-pgsql \ php-xml && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ + cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'localedef -v -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ rm -f /etc/php-fpm.d/www.conf && \ mkdir -p /var/lib/php/ && \ chown --quiet -R nginx:nginx /var/lib/php/ && \ diff --git a/zabbix-appliance/centos/Dockerfile b/zabbix-appliance/centos/Dockerfile index 3069b7ad1..1bf79eea8 100644 --- a/zabbix-appliance/centos/Dockerfile +++ b/zabbix-appliance/centos/Dockerfile @@ -170,6 +170,9 @@ RUN groupadd --system zabbix && \ chown --quiet -R nginx:nginx /var/lib/php/ && \ ls -lah /usr/share/zabbix/ && \ ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \ + cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'localedef -v -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ yum ${YUM_FLAGS_PERSISTENT} clean all && \ rm -rf /var/cache/yum/