cli
cli copied to clipboard
Allow using `${remoteUser}` inside of features
This PR aims to (partially) solve devcontainers/spec/issues/220
The primary goal is to allow features access to the remoteUser-option set in the parent devcontainer.json.
The example container/feature included in this PR (located at src/test/container-features/configs/image-with-local-feature) demonstrates this by using ${remoteUser} in the feature configuration.
I am far away from being fluent in typescript or this codebase. There's very likely a better way to implement this change - in that case I'd be very happy about a hint how to improve this PR.
A PR containing the changes for the feature specs, the schema and the documentation pages will be opened by me right after this PR got merged and verified. Also I'll be very happy to publish my first feature making use of that change as well.
@microsoft-github-policy-service agree
In case there's no notification for marking a PR as ready: It's ready 🎉
Anyone alive? 😄 @chrmarti maybe?
Folks... I'd really appreciate some activity in here.
Can I do something to speed this up a bit?
We have 3 tests now:
- Tests if substitution works inside of a features json
- Tests if substitution works inside of the main devcontainer.json
- Tests if a specified mount containing a substitution gets resolved and used properly.
Happy to add more! Thanks for your time!
Merging this in we'll also want to update the documentation on variables on the spec (https://github.com/devcontainers/spec/blob/main/docs/specs/devcontainerjson-reference.md#variables-in-devcontainerjson and https://github.com/devcontainers/spec/blob/main/docs/specs/devcontainer-features.md) and website.