Based on reading the docs and experimentation, environment variables are only applied to the root user in the container. Is that correct?
For example, if I have something like this in my profile:
config: environment.BAR: bar environment.FOO: foo
I can see these in the root user env with:
$ lxc exec c1 -- env
However, if I look at a different user env with:
$ lxc exec c1 -- sudo --user ubuntu env
FOO and BAR are not shown. If I use the -E arg in the sudo call above, they are shown.
Is that a correct understanding? Is there a way in a profile to apply the environment to other users or should that be done using a different mechanism during container creation?