02/19/2022, 8:02 AM
Hi #hydra, How do I set env variables inside a running container? I tried following this answer on stackoverflow 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.


02/27/2022, 5:22 PM
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:
👀 1