diff --git a/9.6/Dockerfile b/9.6/Dockerfile index 644953e10c..815957d3e2 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -28,10 +28,11 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +ENV LANG en_US.utf8 +ENV LANGUAGE en_US # make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ - && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANG en_US.utf8 + && localedef -i $LANGUAGE -c -f UTF-8 -A /usr/share/locale/locale.alias $LANG RUN mkdir /docker-entrypoint-initdb.d diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index c96fea538d..5caa2ada6d 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -44,6 +44,7 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then chmod 700 "$POSTGRES_INITDB_XLOGDIR" fi + localedef -i $LANGUAGE -c -f UTF-8 -A /usr/share/locale/locale.alias $LANG exec gosu postgres "$BASH_SOURCE" "$@" fi