microsoft / microsoft/vscode-remote-release

Allow localEnv in feature environment variables.

Open
#7,766 8 comments 12 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 30, 2022.

containers feature-request
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Part of the feature spec is a containerEnv property (note - for features, not the devcontainer.json property). It would be nice if it was possible to use the localEnv reference here, so that people who use my feature aren't required to define the environment variable themselves.

Example devcontainer-feature.json

{
    "name": "Some Feature",
    "id": "some-feature",
    "version": "1.0.0",
    "description": "A Feature.",
    "containerEnv": {
        // Currently fails because the substitution isn't performed.
        "DISPLAY": "${localEnv:DISPLAY}",
    },
    // X-11 socket, for window control
    {
        "source": "/tmp/.X11-unix",
        "target": "/tmp/.X11-unix",
        "type": "bind"
    },
    "installsAfter": [
        "ghcr.io/devcontainers/features/common-utils",
    ]
}

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.