[lxc-users] LXC ubuntu locales

zztest at openmailbox.org zztest at openmailbox.org
Fri Apr 1 22:48:18 UTC 2016


On 2016-04-01 09:24, enrico stano wrote:
> Hi,
> 
> I have a really simple Ubuntu Trusty LXC container and I noticed that
> while creating it from the standard ubuntu LXC template it uses the
> same locales as its host.
> 
> This seems really weird to me since I expect that the container should
> be as agnostic as possible from the host.
> 
> What did I try?
> 
> Host: Arch Linux kernel 4.4.5
> Container: Ubuntu 14.04
> 
> Host: Lubuntu kernel 3.5
> Container: Ubuntu 14.04
> 
> in the first case I only have en_US.UTF8 as locale in the host, didn't
> noticed anything weird in LXC.
> 
> In the other case the host has es_ES.UTF8, some on the LXC container
> right after the lxc-create command.
> 
> Ho can I assure that every time the container has en_US.UTF8 or any
> other standard as locale?
> 
> In the configuration file man I didn't find anything related to
> locales.
> 
> Many thanks!
> 
> Bye,
> 
> Enrico
> 
> --
> 
> · Enrico Stano
>  ·
> 
> · twitter @enricostano
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

In an recent answer to my question about locales, Stéphane suggested 
this:
"set environment variables directly on the container or one of its 
profiles, like:

     lxc config set CONTAINER environment.LC_ALL=en_US.UTF-8

LXD will then set those environment variables for you every time you 
exec a command inside the container."

Hope that helps.




More information about the lxc-users mailing list