add extra locale

Currently reading
add extra locale

78
11
NAS
DS412+
currently within my docker:
Code:
$ locale -a
C
C.UTF-8
POSIX

so how to install extra locales? e.g. de_DE.UTF-8?
 
Either one of those methods should work:
Code:
FROM postgres:X.Y
RUN sed -i 's/^# *\(en_US.UTF-8\|de_DE.UTF-8\)/\1/' /etc/locale.gen && \
        locale-gen
ENV LANG de_DE.utf8

or:

Code:
FROM postgres:X.Y
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
ENV LANG de_DE.utf8

I use the first method till ages...

Don't ask me why the ENV LANG needs to be set to de_DE.utf8. Even though de_DE.UTF-8 would make more sense, it never worked for me.

Postgres is just used as an example. Pick whatever base image you want to use.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top