devcontainers / devcontainers/spec

Proposal: Allow using env-vars in devcontainer-feature.json

Open
#220 9 comments 3 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

My current use case involves defining additional container mounts in the future users home directory in the container. It seems to be impossible at the moment, since the `remoteUser` is configurable.

`${devcontainerId}` seems to be the only variable that can be used in the `devcontainer-feature.json` file. There are 2 env variables mentioned in the feature spec (`_REMOTE_USER_HOME` and `_CONTAINER_USER_HOME`) but they are only accessible in the `install.sh`-script.

I'd like to have access to more variables, either the ones passed to the install-script, or the ones used in the parents `devcontainer.json`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.