I am running a docker exec -it ... command and I need to use an environment variable of my docker container. An example:
docker exec -it container_id command_here param_1 $param_2_as_env_variable
In the case above, it pulls param_2_as_env_variable from host machine, and not the docker container. Is it possible to use env variable from container itself while running docker exec ... command from another machine?
Update: I can use ouput of docker exec -it container_id printenv | grep .... But I couldn't separate value and key. How can I get only value here?