Hi <#C012RBW0F18|hydra>, How do I set env variable...
# talk-hydra
l
Hi #hydra, How do I set env variables inside a running container? I tried following this answer on stackoverflow https://stackoverflow.com/a/30120197/5940139 But it returns error saying
Copy code
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
I tried inspecting docker image to find out the path for Cmd but I can't see Cmdover there.
at some places it was recommended to use sh instead of /bin/bash It didn't set the env values though.
f
Hi @User, If you're using k8s to deploy your containers, then you can $ kubectl set env <deployment> <env_var>=<value> e.g. $ kubectl set env deployment/my-hydra LOG_LEAK_SENSITIVE_VALUES=true. Then run $ kubectl set env pods --all --list to verify your new env var is set. Note that you must set env on the deployment, as the pod is read-only. If you're using docker-compose, I haven't tried it but this page might help: https://docs.docker.com/compose/environment-variables/
👀 1