cli icon indicating copy to clipboard operation
cli copied to clipboard

Substitution in feature ids

Open aacebedo opened this issue 3 years ago • 4 comments

I try to use substitution in feature id of my devcontainer.json (using ${env:ENV} but it does not seem to work. Is it possible to activate this?

aacebedo avatar May 22 '23 11:05 aacebedo

Thanks for opening!

Perhaps you could try containerEnv or remoteEnv: https://containers.dev/implementors/json_reference/?

If they don't seem relevant, could you please share an example of the devcontainer.json you're using and what you'd like to achieve with it (i.e. which part you'd like to use an environment variable for)?

bamurtaugh avatar Jun 02 '23 17:06 bamurtaugh

In the devcontainer.json the array features cannot contain a value with a substitution. for instance I cannot do the following:

{
"features": { "https://example.com/my_feature_${env:FOO_ARG}.tar.gz": {} }  
}

aacebedo avatar Jun 04 '23 20:06 aacebedo

Is it possible to have a look to this please? @bamurtaugh I want to use an env variable to be able to fetch a feature from a private repository using a private token. I implemented this feature in a PR for devpod https://github.com/loft-sh/devpod/pull/696

aacebedo avatar Sep 17 '23 14:09 aacebedo

cc @joshspicer would love to get your thoughts here.

bamurtaugh avatar Sep 18 '23 19:09 bamurtaugh