cli icon indicating copy to clipboard operation
cli copied to clipboard

Passing environment variables in features

Open Androoideka opened this issue 3 years ago • 1 comments

Hi, I was trying to set up a feature that would configure the container's environment variables and mounts to allow applications in the container to use WSLg. I've set this up fine in a devcontainer.json by using ${localEnv:?}, but it seems features can only use environment variables from the container.

Would it be possible to pass host environment variables to a container through a feature? Thanks!

Androoideka avatar Nov 18 '22 06:11 Androoideka

We have remoteEnv & containerEnv, but I don't think those would be helpful to pass host environment variables to a container through a feature.

@chrmarti / @joshspicer / @edgonmsft Am I missing something, or do we have a way to make this work? 🤔

samruddhikhandale avatar Nov 21 '22 23:11 samruddhikhandale