Lxc-attach does not inherit environment vars set by lxc-execute -s lxc.environment=FOO=BAR


(Mrinal Dhillon) #1

Is this expected behavior?

lxc-execute cntr -s lxc.environment=FOO=BAR -d – env | grep FOO
FOO=BAR
lxc-attach cntr – env | grep FOO #FOO is not set.
Behaviour is same with lxc-start as well.

However environments variables in container’s config file applies to command started with lxc-attach .