Hello, I have a local agent that launches docker c...
# ask-community
y
Hello, I have a local agent that launches docker containers. I'd like to set a secret somehow to an env_var in container_context in the locations file. How can I do that? I know locations files can't use env vars ${var} but there is another way to set an env var so that the contents aren't in the locations file? Thanks
🤖 1
d
Hey Yang - you can also set an env_var in conatainer_context like this:
Copy code
env_vars:
  - ENV_VAR_NAME
(without a value) and if ENV_VAR_NAME is already set in the agent's environment, it will pull the value into the container from the environemnt (by calling os.getenv("ENV_VAR_NAME"). We'd like to add more secrets manager integrations or a native Dagster secrets manager in the future as well.
y
Oooh really, great thanks!