microsoft / microsoft/vscode-remote-release
Pass env variables when attach remote containers
@chrmarti is already working on this.
Since Jul 29, 2024.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
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 :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.