Skip to content

Commit efe5929

Browse files
author
Juanma
committed
Support to be able to change the language of the database
1 parent aaf2098 commit efe5929

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

9.6/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ RUN set -x \
2828
&& gosu nobody true \
2929
&& apt-get purge -y --auto-remove ca-certificates wget
3030

31+
ENV LANG en_US.utf8
32+
ENV LANGUAGE en_US
3133
# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
3234
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
33-
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
34-
ENV LANG en_US.utf8
35+
&& localedef -i $LANGUAGE -c -f UTF-8 -A /usr/share/locale/locale.alias $LANG
3536

3637
RUN mkdir /docker-entrypoint-initdb.d
3738

9.6/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env bash
22
set -e
33

4+
localedef -i $LANGUAGE -c -f UTF-8 -A /usr/share/locale/locale.alias $LANG
5+
46
# usage: file_env VAR [DEFAULT]
57
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
68
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of

0 commit comments

Comments
 (0)