Vscode-remote-release: Not able to load local container definition repository: remote.containers.repositoryConfigurationPaths

Created on 22 Sep 2020  路  9Comments  路  Source: microsoft/vscode-remote-release

Version: 1.49.1 (system setup)
OS: Windows_NT x64 10.0.19041

  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Clone https://github.com/microsoft/vscode-dev-containers/tree/master/repository-containers
  2. Specify remote.containers.repositoryConfigurationPaths:
"remote.containers.repositoryConfigurationPaths": [
    "C:/Nikiforov/dev/vscode-dev-containers/repository-containers",
]
  1. Run the command: "Remote Containers: Open folder in Container"

As result, I don't see files that I'd expect to see when I set this setting on.

I'm wondering what URL/paths are supported. Can I include git repo to fetch my definitions? Based on what criteria container definitions are added?

*question containers needs-more-info

Most helpful comment

We check which Git repository C:\Nikiforov\dev\devconatiners-test2 is cloned from, e.g. https://github.com/NikiforovAll/devconatiners-test2. And then lookup the configuration based on that, e.g., ${repositoryConfigurationPath}/github.com/NikiforovAll/devconatiners-test2 for each of the configured repositoryConfigurationPaths (and also for a built-in one that has all the configurations from https://github.com/microsoft/vscode-dev-containers/tree/master/repository-containers).

All 9 comments

Ultimately, I would like to have my container definition on GitHub, something like: https://github.com/NikiforovAll/dev-containers

Ref: #3218

Which folder are you opening in the container? Does that folder have a Git repository? (It is the Git repository of the folder you are opening in a container that determines which of the configurations in your repositoryConfigurationPaths is picked.)

Here is what I've done:

  1. Clone https://github.com/Microsoft/vscode-dev-containers. (Also, I can see the git repository there)
  2. Add path configuration, C:\Nikiforov\dev\vscode-dev-containers\repository-containers.
  3. Open folder located on my windows machine 'C:\Nikiforov\dev\devconatiners-test2\'
  4. Run remote-containers.createDevContainerFile in vscode

Expected container definitions are not displayed.

These configuration paths work differently: If the local folder ('C:\Nikiforov\dev\devconatiners-test2') is a Git repository matching a configuration (based on its path) in the path you configured, that configuration will be used to open the folder in a container when you trigger Reopen in Container.

I'm sorry, but I don't get it.

If the local folder ('C:\Nikiforov\dev\devconatiners-test2') is a Git repository matching a configuration (based on its path) in the path you configured

In my case, it is not a git repository matching a configuration. _devconatiners-test2_, but rather, it is a folder that I want to open in a container defined locally in 'C:\Nikiforov\dev\vscode-dev-containers\repository-containers'. So I've added C:\Nikiforov\dev\vscode-dev-containers\repository-containers to configuration.

Could you please provide an example?

We check which Git repository C:\Nikiforov\dev\devconatiners-test2 is cloned from, e.g. https://github.com/NikiforovAll/devconatiners-test2. And then lookup the configuration based on that, e.g., ${repositoryConfigurationPath}/github.com/NikiforovAll/devconatiners-test2 for each of the configured repositoryConfigurationPaths (and also for a built-in one that has all the configurations from https://github.com/microsoft/vscode-dev-containers/tree/master/repository-containers).

Nice feature. Would have been more useful if remote.containers.repositoryConfigurationPaths supported remote paths and not just local paths.
It wasn't quite clear that remote.containers.repositoryConfigurationPaths supports only local paths until I read this.

SUPPORTED

"remote.containers.repositoryConfigurationPaths": [
    "/Users/name/git/vscode-dev-containers/repository-containers"
]

UNSUPPORTED

"remote.containers.repositoryConfigurationPaths": [
    "https://github.com/name/vscode-dev-containers/tree/master/repository-containers"
]

Where can I contribute a patch to the documentation of remote.containers.repositoryConfigurationPaths to make this clear?

Documentation is here: https://github.com/microsoft/vscode-docs

Thanks!

Was this page helpful?
0 / 5 - 0 ratings