I know how to pass environment variables to docker container. like
sudo docker run -e ENV1='ENV1_VALUE' -e ENV2='ENV2_VALUE1' ....
I am able to successfully pick these variables if I run script from shell inside the docker container. But the runlevel scripts of docker instance, are not able to see environment variables passed to docker container. Eventually all services/daemon are starting with default configuration which I don't want.
Please suggest some solution for it.