Environment variables aren't visible

That’s not how this works unfortunately. Those environment variables are passed to anything you lxc exec and is passed to the container’s init system.

Unfortunately init systems usually don’t care much for those environment variables and never propagate them to their children, meaning that they’re effectively just present in lxc exec sessions or to scripts which directly look at PID 1’s environment.