From a266023ab572f6dc728271a2f3936c385674c08a Mon Sep 17 00:00:00 2001 From: Radosław Piliszek Date: Wed, 25 Sep 2019 18:28:38 +0200 Subject: Use C.UTF-8 locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker/base/Dockerfile.j2 | 6 ++++++ releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/unicode-locale-018fe01eaccc556d.yaml 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. -- cgit v1.2.3