microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.64k stars 285 forks source link

Add possibility to use a custom predefined container definitions repository for quick setup #4852

Open mehd-io opened 3 years ago

mehd-io commented 3 years ago

Hi there, First, thank you so much for the awesome work on this life-changing plugin!

A lot of companies need to have a custom docker base image layer (for security, standard on Linux distrib, reusability, and align with production deployment). In such a context, it's difficult to use the existing definitions from https://github.com/microsoft/vscode-dev-containers for development. The solution is then to create custom dev container definitions and regroup them in a repo, but it makes it a bit cumbersome to have to copy manually these ones each time you start a project or want to work with remote container.

Not sure how the current setup works, if its relay on an external service or directly from the git repo mentioning above, but it will be awesome if we could link from vscode a custom predefined repo and then the user would basically be able to navigate and list through the custom predefined dev docker containers definition as it is today for the one provided by Microsoft Screenshot 2021-04-08 at 13 37 25

rubensa commented 2 years ago

@chrmarti Any news on this feature request?

Chuxel commented 2 years ago

This is getting discussed as a part of the dev container spec here: https://github.com/devcontainers/spec/issues/7

Also note that there's a discussion of allowing dev container metadata on image labels as well which would provide a direct image tie where this is preferable: https://github.com/devcontainers/spec/issues/18

The UX in VS Code then would be updated to support these capabilities of the overall spec.

rubensa commented 2 years ago

:muscle: Great news! Thanks for the info @Chuxel

rubensa commented 1 year ago

Hello @Chuxel The https://github.com/devcontainers/spec/issues/18 has been closed. Now the "default" templates are going to be public available at an OCI registry (looks it is ghcr.io/microsoft/templates for templates and ghcr.io/microsoft/features for features) but, to me, it is not clear how we can customize the OCI registries to look for templates. Is there any setting in VSCode with the list of the OCI registries/namespaces? Is it possible to have private registries? How can we provide authentication credentials to private registries in VSCode?

Chuxel commented 1 year ago

@samruddhikhandale is working on a starter repository for Templates, but for Features, one already exists that explains all of this.

https://github.com/devcontainers/feature-template

There's a yaml file you can PR to add your collections to the index, which then results in it showing up here and here as well as in-tool or service (e.g., GitHub now is showing Features in a devcontainer.json editor.)

rubensa commented 1 year ago

So there is no way to have "private" templates and features? There is only one "list of things" that VSCode is going to check? There is no setting like dev.containers.repositoryConfigurationPaths? :thinking:

Chuxel commented 1 year ago

There is not a way to add private Templates to the list today, no. That said, core of what is required is in place to enable that kind of thing.

FWIW - You can reference private Features in devcontainer.json so long as you've logged into the container registry that stores it, however.