Skip to content

Dev Containers: Environment variables from devcontainer.json not propagated to container #11989

@vrognas

Description

@vrognas

System details:

Positron and OS details:

Positron Version: 2026.03.0 (user setup) build 123
Code - OSS Version: 1.108.0
Commit: 2faec0c
Date: 2026-02-19T08:36:08.027Z
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

Describe the issue:

No cap, I set some environment variables in devcontainer.json, but none were available from within the container. The image I'm using is a slightly customized image of a "rocker" image (https://rocker-project.org/).

Steps to reproduce the issue:

  1. Drop this in devcontainer.json:
"containerEnv": {
    "FOO": "bar"
}
  1. Yeet yourself into the container via Dev Containers: Reopen in Container
  2. Run echo $FOO in the terminal
  3. Watch it be completely empty and feel your soul leave your body 💀

Expected or desired behavior (the dream):

I lowkey expected echo $FOO to return bar. That's it frfr.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions