Skip to content

Pass env variables when attach remote containers #10104

Open

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 :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

containersIssue in vscode-remote containersfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions