Skip to content

${containerEnv:TEST_VAR} does not work with mounts #7147

@tvenhaus

Description

@tvenhaus

Environment:

  • VSCode Version: 1.71.0-insider (user setup)
  • Local OS Version: Windows 11
  • Remote OS Version: Ubuntu (though any will work)
  • Remote Extension/Connection Type: Containers

Steps to Reproduce:

  1. Create a new folder and open in VS Code
  2. Add Dev Container configuration files (choosing Ubuntu)
  3. Create /.devcontainer/devcontainer.env file:
TEST_VAR=/mnt/c/LocalFolder
  1. Add the following to the devcontainer.json file:
"runArgs": ["--env-file",".devcontainer/devcontainer.env"],
"mounts": [
	"source=${containerEnv:TEST_VAR},target=/remotefolder,type=bind,consistency=cached"
]
  1. Rebuild and Open in Container
  2. Observe Error
    docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: '${containerEnv:TEST_VAR}' mount path must be absolute.

May be related to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    containersIssue in vscode-remote containers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions