Abilitity to set remoteEnv with initializeCommand #54
davidbarratt
started this conversation in
Ideas
Replies: 1 comment
-
Thank you for opening this @davidbarratt! @chrmarti @alexander-smolyakov I'd be interested in getting your thoughts on this one. |
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
-
We currently have a
compose.yml
that is like this:where the value of the
NPM_TOKEN
enivornment variable is taken from the developers current terminal.The way this is populated, is with a script that looks something like this:
When putting this in an
initializeCommand
it seems the value is not exported into the same shell that is used by devcontainers, meaning docker compose sets it to an empty string:It seems like it is impossible for us to safely use devcontainers until this is fixed. :/
One way to fix this would be to be able to use the same shell for the script as where the
docker compose up
command is run.There could be other solutions too, like running an
initContainer
to startup a container that can set environment variables or something. I'm open to other solutions!Beta Was this translation helpful? Give feedback.
All reactions