Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'remoteUserHome' variable to devcontainer-feature.json #391

Open
samruddhikhandale opened this issue Feb 1, 2023 · 3 comments
Open
Labels
feature-request New feature or request

Comments

@samruddhikhandale
Copy link
Member

samruddhikhandale commented Feb 1, 2023

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

"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.

@samruddhikhandale
Copy link
Member Author

If _REMOTE_USER_HOME could be made available for mounts as well, then it could help solve devcontainers/features#384

@samruddhikhandale samruddhikhandale changed the title Expose _REMOTE_USER_HOME to the containerEnv variable Expose _REMOTE_USER_HOME to the devcontainer-feature.json properties (like containerEnv, mounts) Feb 1, 2023
@chrmarti
Copy link
Contributor

chrmarti commented Feb 2, 2023

We could add ${remoteUserHome} (and similar variables). (This would align more with what we already have than environment variables.)

@chrmarti chrmarti added the feature-request New feature or request label Feb 2, 2023
@samruddhikhandale samruddhikhandale changed the title Expose _REMOTE_USER_HOME to the devcontainer-feature.json properties (like containerEnv, mounts) Add 'remoteUserHome' variable to devcontainer-feature.json Feb 2, 2023
@samruddhikhandale
Copy link
Member Author

We could add ${remoteUserHome} (and similar variables). (This would align more with what we already have than environment variables.)

Make sense, updated the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants