[lxc-users] How to set LXD container locale?

Claudio Kuenzler ck at claudiokuenzler.com
Sat Mar 19 12:10:16 UTC 2016


Have you tried this way:

echo "en_US.UTF-8 UTF-8" > /etc/locale.gen

locale-gen

It's the method we're using the set the locale in LXC containers.

On Sat, Mar 19, 2016 at 11:33 AM, <zztest at openmailbox.org> wrote:

> None of the typical ways of setting locales seem to stick in my Ubuntu
> container in an Ubuntu host (Ubuntu 15.10, LXD 2.0.0.rc4)
>
> The host's locale shows this
>
> LANG=en_US.UTF-8
> LANGUAGE=
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER="en_US.UTF-8"
> LC_NAME="en_US.UTF-8"
> LC_ADDRESS="en_US.UTF-8"
> LC_TELEPHONE="en_US.UTF-8"
> LC_MEASUREMENT="en_US.UTF-8"
> LC_IDENTIFICATION="en_US.UTF-8"
> LC_ALL=
>
>
> but the container shows this
>
>
> LANG=
> LANGUAGE=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
>
> /etc/default/locale contains the same value (LANG="en_US.UTF-8") in both
> the container and the host, but I cannot get it to set in the container.
> How is the locale set/changed in an LXD container?
>
> Thanks.
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160319/8b34260b/attachment.html>


More information about the lxc-users mailing list