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

Simplify multiple devcontainer creation process. Allow multiple devcontainer.json ,we should be able to select any json and create dev container. #166681

Closed
SamPosh opened this issue Nov 18, 2022 · 2 comments
Assignees

Comments

@SamPosh
Copy link

SamPosh commented Nov 18, 2022

Currently it allows a single devcontainer.json file per .devcontainer folder.
This will give limitation of creating one devcontainer. Multiple devcontainer

Instead in .devcontainer folder allow to have multiple devcontainer.json file. Also provide the menu option by right clicking json files we should be able to create devcontainer.

For example , consider below as the folder structure

.devcontainer
    devcontainer.json   
    devcontainer_2.json   (it will have different dockerfile)
    devcontainer_3.json  (it will have another different dockerfile)
    devcontainer_n.json  (it will have another different dockerfile)

devcontainer.json -> This is default one which will be used to created dev container when we click 'Reopen in container' menu.
devcontainer_2/3/n -> If we right click, there should be a menu showing option 'Create devcontainer'. If I click it then devcontainer enviornment should be prepared using this file. In this file I would point to different dockerfile which contains my proxy settings and extra packages and softwares required for testing.

So multiple container creation process would be simple.

@SamPosh SamPosh changed the title Simplify multiple devcontainer creation process. Allow multiple devcontainer.json ,we can select any json and create dev container. Simplify multiple devcontainer creation process. Allow multiple devcontainer.json ,we should be able to select any json and create dev container. Nov 18, 2022
@julien-boudry
Copy link

julien-boudry commented Nov 28, 2022

It should be much more coherent with Github Codespace. And also cleaner than one repository for each at the root level.

Github Codespace recommends the following structure:
https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson
(or one per subfolder, but default container must be directly under .devcontainer)

image

Then, Github Interface allows choosing a container:

image
Or in VS Code:
image

But it's impossible with Visual Studio Dev Container, only the default container is allowed.

@chrmarti
Copy link
Contributor

chrmarti commented Dec 1, 2022

Tracked as microsoft/vscode-remote-release#7548. Thanks.

@chrmarti chrmarti closed this as completed Dec 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants