From 7e066a18cbe3537fa8e71cd4805d95de331dfe78 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Sat, 22 Jul 2017 09:45:28 +0200 Subject: [PATCH] Install locales package and define default locale as en_US.UTF-8 (#480) otherwise initdb fails --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8d99b11b..d412ebd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ && apt-get upgrade -y \ && apt-get install -y curl jq haproxy python-psycopg2 python-yaml python-requests python-six python-pysocks \ - python-dateutil python-pip python-setuptools python-prettytable python-wheel python-psutil python \ + python-dateutil python-pip python-setuptools python-prettytable python-wheel python-psutil python locales \ + + ## Make sure we have a en_US.UTF-8 locale available + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ && pip install 'python-etcd>=0.4.3,<0.5' click tzlocal cdiff \ @@ -40,5 +43,6 @@ RUN mkdir /data/ && touch /pgpass /patroni.yml \ EXPOSE 2379 5432 8008 +ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] USER postgres