I’m trying to run some behavior tests on my docker environment after I build my container.
For some reason, environment variables either specified on Dockerrun file or with the option “-e” are not being available on container when it is running.
I’d very much like to hear an answer to this question.
I’m in the exact same position as OP, and lxc-attach is definitely not a working alternative to docker exec.
I tried nsenter too, but same problem: the environment variables are not set according to the original container you’re entering into.