aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-09-25 18:28:38 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-09-26 12:29:19 +0200
commita266023ab572f6dc728271a2f3936c385674c08a (patch)
tree1d57043a2ea3260888b51dd08d78892c6ffaf06a
parentc08a4b5a6352f3d1ebf640687d68d00aabc11ff6 (diff)
downloadkolla-a266023ab572f6dc728271a2f3936c385674c08a.tar.gz
kolla-a266023ab572f6dc728271a2f3936c385674c08a.zip
Use C.UTF-8 locale
This ought to fix problems with Unicode, including the recent vmtp issue with tabulate 0.8.4 failing due to non-Unicode locale (Ubuntu Bionic 18.04 Python 3.6). Change-Id: I8b55a6a260cab14c2292cac02a1a07729223c281 Related-bug: #1845306 Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
-rw-r--r--docker/base/Dockerfile.j26
-rw-r--r--releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml8
2 files changed, 14 insertions, 0 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 30845f180..39eec6c90 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -1,6 +1,12 @@
FROM {{ base_image }}:{{ base_distro_tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+{% block base_lang %}
+# NOTE(yoctozepto): use a UTF-8 (Unicode) locale like standard image installs do
+# fixes issues arising from ascii fallback usage
+ENV LANG C.UTF-8
+{% endblock %}
+
{# NOTE(SamYaple): Avoid uid/gid conflicts by creating each user/group up front. #}
{# Specifics required such as homedir or shell are configured within the service specific image #}
{%- for name, user in users | dictsort() %}
diff --git a/releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml b/releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml
new file mode 100644
index 000000000..b248f91bf
--- /dev/null
+++ b/releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml
@@ -0,0 +1,8 @@
+---
+upgrade:
+ - |
+ ``C.UTF-8`` is set as the default locale (``LANG``) for images.
+ This affects both build- and run-time.
+ Distributions supported by Kolla default to UTF-8 locale in
+ installs so this change should provide a more expected experience.
+ It makes images Unicode-friendly.