microsoft / microsoft/vscode-remote-release

Pass env variables when attach remote containers

Open
#10,104 2 comments 11 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Jul 29, 2024.

containers feature-request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.