devcontainers / devcontainers/cli

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

Abierto
#391 3 comentarios 1 reacción 0 asignados Ver en GitHub
feature-request
Lenguaje dominante
TypeScript
Estrellas
3k
Forks
457
Merge medio
13 h 17 min
PR fusionados (30 d)
6

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.