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

Use devcontainer.json in subdirectories in monorepo #159

Closed
eitsupi opened this issue Dec 14, 2022 · 6 comments
Closed

Use devcontainer.json in subdirectories in monorepo #159

eitsupi opened this issue Dec 14, 2022 · 6 comments

Comments

@eitsupi
Copy link

eitsupi commented Dec 14, 2022

We may want to work with different Dev Containers for each subdirectory. (e.g., a monorepo like https://github.com/apache/arrow)
In such a case, VSCode can recognize any devcontainer.json by opening a subdirectory, but Codespaces only recognizes those in the root directory.

I am wondering if it is possible to put a new type configuration file (such as .devcontainer-paths.json?) in the root directory with the paths to each devcontainer.json so that the tool is aware of each container definition.

@samruddhikhandale
Copy link
Member

Codespaces supports monorepo and multi-repo scenarios. Have you taken a look at this blog post ?

If yes, then are you looking forward to another specification for mono repo? would like to clarify my understanding.

@Chuxel
Copy link
Member

Chuxel commented Dec 14, 2022

@samruddhikhandale - I think the ask here is not to have to put everything under .devcontainer which is at the root. ("but Codespaces only recognizes those in the root directory" being the notable piece).

Instead the request is to allow a .devcontainer folder or .devcontainer.json file to be in any sub-folder.

The VS Code Dev Containers extension is behind on implementing everything under .devcontainer at the root, but this is different.

@eitsupi
Copy link
Author

eitsupi commented Dec 15, 2022

Codespaces supports monorepo and multi-repo scenarios. Have you taken a look at this blog post ?

Thanks for pointing this out.
Sorry, I wasn't aware that this structure was defined in the spec!

- .devcontainer/devcontainer.json
- .devcontainer.json
- .devcontainer/**/devcontainer.json (where ** is a sub-folder)

After trying it out, I think this behavior of Codespaces is sufficiently attractive.

But VSCode Dev Container doesn't seem to recognize .devcontainer/**/devcontainer.json, so I guess we need to place .devcontainer.json in a subdirectory like **/ for now and create a container from that directory?
It would be great if VSCode DevContainer supported .devcontainer/**/devcontainer.json and users can choose these.
Should I create an issue on https://github.com/microsoft/vscode-remote-release?

@Chuxel
Copy link
Member

Chuxel commented Dec 15, 2022

It would be great if VSCode DevContainer supported .devcontainer/**/devcontainer.json and users can choose these.
Should I create an issue on https://github.com/microsoft/vscode-remote-release?

@chrmarti Raised microsoft/vscode-remote-release#7548 but there's not much of a description, so can add that. You can upvote there!

@Chuxel
Copy link
Member

Chuxel commented Dec 15, 2022

@eitsupi Would you like to keep this open for using any sub-folder or do you think we should close as a dupe of getting this into the Dev Containers extension (microsoft/vscode-remote-release#7548)?

@eitsupi
Copy link
Author

eitsupi commented Dec 16, 2022

Closing in favor of .devcontainer/**/devcontainer.json pattern.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants