spec
spec copied to clipboard
[Proposal] Introduce `path` property in `devcontainer-feature.json`
The $PATH variable is often modified by Features during installation to make a certain tool/script/etc easily accessible from the command line. A common pattern today is to use containerEnv to modify the path variable, like so:
...
"containerEnv": {
"PATH": "/home/vscode/dotnet":${PATH}"
}
...
Adding a property path to the devcontainer-feature.json would provide a declarative way for indicate what a Feature author intends to be available at the end. Doing so this way would also limit pollution of the PATH variable by allowing the CLI an easy way to dedupe.
Proposal
| Property | Type | Description |
|---|---|---|
path |
array |
An array of strings, each an absolute path that should be injected as a member of the $PATH variable. |
ref: https://github.com/devcontainers/spec/pull/234#discussion_r1218563819
Somewhat related: https://github.com/devcontainers/spec/issues/19