Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to load local container definition repository: remote.containers.repositoryConfigurationPaths #3712

Closed
NikiforovAll opened this issue Sep 22, 2020 · 9 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@NikiforovAll
Copy link

NikiforovAll commented Sep 22, 2020

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?

@NikiforovAll
Copy link
Author

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

@NikiforovAll
Copy link
Author

Ref: #3218

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Sep 22, 2020
@chrmarti
Copy link
Contributor

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.)

@chrmarti chrmarti self-assigned this Sep 23, 2020
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Sep 23, 2020
@NikiforovAll
Copy link
Author

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.

@chrmarti
Copy link
Contributor

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.

@NikiforovAll
Copy link
Author

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?

@chrmarti
Copy link
Contributor

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).

@chrmarti chrmarti added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Nov 11, 2020
@twodrops
Copy link

twodrops commented Dec 20, 2020

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?

@chrmarti
Copy link
Contributor

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

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants
@twodrops @NikiforovAll @chrmarti and others