microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

Empty variables in the devcontainer definitions #1750

Open zaadeh opened 1 year ago

zaadeh commented 1 year ago

Steps to Reproduce:

  1. I need to mount local ssh keys from ~/.ssh into the devcontainer using this mount option: "mounts": [ "source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind" ] I need this to be able to push and pull changes from Github.
  2. Both of the variables ${localEnv:HOME} and ${localEnv:USERPROFILE} seem to be empty when devcontainer is activated and I can see the devcontainer output that docker command is being passed wrong mount options as a result of this and therefore the devcontainer activation fails.
  3. This is true when running vscode directly from Windows or running it from WSL.