[lxc-users] Environment variable question

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jan 5 23:15:01 UTC 2015


Quoting C. R. Oldham (cro at ncbt.org):
> Greetings,
> 
> I've been experimenting with using Arch Linux for a container host.
> 
> I've noticed that Arch's default PATH is quite different from other distros.  It appears that lxc passes in some environment variables when running lxc-attach, including PATH, and in particular when running an Ubuntu container most things don't work.  Part of this is because Ubuntu sets its default PATH in /etc/environment, which only gets parsed and processed by PAM.  lxc-attach doesn't involve PAM, so the PATH doesn't get set.
> 
> In older manpages for LXC that I found on the net it seems there used to be a configuration variable 'lxc.environment', enabling things like 'lxc.environment = PATH=/usr/bin/...', but this is not present in lxc 1.0.7.  Is there another way to do this now?

lxc.environment is still present in lxc git head, and works for me in
ubuntu 14.10.


More information about the lxc-users mailing list