I'm trying to set a enviroment variable of a docker container through bash script.
CMD ["/bin/bash", "-c","source runservice.sh"]
runservice.sh
#!/usr/bin/env bash
export "foo"="bar"
Now after pushing it when I go inside the container and do printenv, it is not setting up enviroment variable. But if I run the same command inside the container, env variable is getting set up. What's the correct way I can export using bash script?