How to inherit Dockerfile environment variables into a VScode terminal? #6838
Unanswered
amoosebitmymom
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Since you mention Remote SSH, you are probably talking about VS Code; code-server is a browser-only wrapper around VS Code and does not support the Remote SSH extension, so you might want to ask up at https://github.com/microsoft/vscode. That said, I think adding the variables to the profile is the best option. Maybe you can do something with |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running inside an air-gapped environment.
I have a Dockerfile where I install code-server, and run an ssh daemon to connect to.
Inside the Dockerfile, I configure many important variables. For instance, I am running my own artifactory server, so I set PIP environment variables so that pip could work (I know that I can put pip values in a config file, but some stuff I can't).
When I connect to the code-server from vscode (using Remote SSH) and open a new terminal, none of the environment variables I set. I understand why this is the behavior.
Is there a way to configure in coder to inherit these environment variables?
I know I can write a terminal profile with environment variables in it. But then every variable I define in the Dockerfile, I have to define separately in the settings.json. These separate sources of truths could cause configuration drift overtime. I'd rather not pursue that solution unless absolutely necessary
Any help would be appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions