microsoft / microsoft/vscode-remote-release

Feature Request: Support for Global Environment Variables / Secrets

Open
#11,566 0 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Apr 2, 2026.

containers
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Currently, when using Dev Containers locally, there is no native way to inject global environment variables or secrets across multiple projects. While GitHub Codespaces provides a "Secrets" feature that allows users to define environment variables once and have them available in every Codespace, local Dev Containers require hardcoding variables in devcontainer.json.

This becomes particularly problematic when using dotfiles. Many developers use dotfiles to automate their environment setup, but dotfiles often require API keys, tokens, or private configurations (e.g., ONEPASSWORD_TOKEN, AGE_PRIVATE_KEY, etc.). To keep these secure, we cannot commit them to the dotfiles repository.

I would like to propose a way to define Global Environment Variables in VS Code that are automatically injected into any Dev Container session.

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.