Docker Community Forums

Share and learn in the Docker community.

Parameters passed into docker via build do not influence centos env vars


(Mdf0) #1

I am passing a few environment variables into a container at build using "… --env xxx=123 --env )))…

When I run the following after a “start”:

docker exec -i -u user containerName /bin/bash -c “env”

I see these values.

xxx=…123
yyy=345

But they’re not reflected in the centos environment (using “env” on a commandline).

How could I make have these values appear?