cli icon indicating copy to clipboard operation
cli copied to clipboard

Allow using `${remoteUser}` inside of features

Open max06 opened this issue 2 years ago • 6 comments
trafficstars

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.

max06 avatar May 17 '23 15:05 max06

@microsoft-github-policy-service agree

max06 avatar May 17 '23 15:05 max06

In case there's no notification for marking a PR as ready: It's ready 🎉

max06 avatar Jul 25 '23 22:07 max06

Anyone alive? 😄 @chrmarti maybe?

max06 avatar Aug 08 '23 20:08 max06

Folks... I'd really appreciate some activity in here.

Can I do something to speed this up a bit?

max06 avatar Sep 03 '23 18:09 max06

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!

max06 avatar Sep 05 '23 21:09 max06

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.

joshspicer avatar Sep 08 '23 15:09 joshspicer