microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.66k stars 288 forks source link

Pass env variables when attach remote containers #10104

Open Victor-G8 opened 3 months ago

Victor-G8 commented 3 months ago

Hello,

It could be very nice to pass env variables when we attach a remote container with the Dev Containers extension.

The only way i found from now is to modify the directive "docker.commands.runInteractive" in the settings.json and pass an env variable inside:

"docker.commands.runInteractive": "${containerCommand} run --rm -it -e TOTO=tata ${exposedPorts} ${tag}",

But this way work only when i "Attach Shell" not when i "Attach Visual Studio Code".

Furthermore the "docker.environment" do not work with a remote container.

Thanks :)

vs-code-engineering[bot] commented 3 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vs-code-engineering[bot] commented 2 months ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!