Replies: 2 comments 2 replies
-
Hi 👋 Looping in @chrmarti to help answer your question. On a side note, if you use supporting tools like GitHub Codespaces then you'd be able to configure repo secrets to achieve this. See https://docs.github.com/en/codespaces/managing-your-codespaces/managing-your-account-specific-secrets-for-github-codespaces |
Beta Was this translation helpful? Give feedback.
2 replies
-
I would love if you could dynamically set variables/build args like so:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I understand that in a
devcontainer.json
file, I can use${localEnv:VARIABLE_NAME}
to access environment variables on the host. This is very useful, but I would like to have access to some project-specific variables that I normally access by sourcing a bash script from the project. Is there a way to effectively source a bash script to modify the environment variables before thedevcontainer.json
gets parsed such that they are available through the${localEnv:VARIABLE_NAME}
substitution mechanism?As an example, one of these project-specific variables defines the docker image/tag string for the project. I'd like to use this value for the
image
property in thedevcontainer.json
file so that I can have a single source of truth for the docker image/tag string in my project.I'm aware that I can achieve what I'm after by sourcing my project-specific script before running my
devcontainer.json
supporting tool (in this case, I'm using VS Code). But I'd prefer a solution that does not place constraints on how the user starts the tool.Beta Was this translation helpful? Give feedback.
All reactions