devcontainers / devcontainers/cli

Add 'remoteUserHome' variable to `devcontainer-feature.json`

未关闭
#391 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
feature-request
主要语言
TypeScript
星标
3k
派生
457
平均合并
13 小时 17 分钟
30 天内合并 PR
6

描述

Scenario - In `devcontainer-feature.json` I’d like to do update the `containerEnv.PATH` as follows 👇

```jsonc

"containerEnv": {
"PATH": "${remoteUserHome}/.local/bin:${PATH}"
}
```

where the `remoteUserHome` can be `/root` or `/home/userName` depending upon the remote user. Currently, I am not able to add the following to the `PATH` because the remote user is dynamic and hardcoding wouldn't work.

As `remoteUserHome` is available during running feature scripts, I wonder if they could be available when the `containerEnv` merge logic is implemented?

I also tried to add `~/.local/bin` to the PATH, however, that doesn't work if a shell is not invoked. Hence, doesn't help in my scenario.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。