Allow for inheritance of devcontainer spec #9
Replies: 3 comments 2 replies
-
|
Great suggestion! There's a proposal for this at devcontainers/spec#22. See what you think! |
Beta Was this translation helpful? Give feedback.
-
|
When working with devcontainers in VS Code (which is probably true for most users), the described use case can be partially solved with:
What I would like in the same spirit is: microsoft/vscode-dev-containers#1221 Aside of devcontainers/cli#311, this seems to support this use case too: microsoft/vscode-remote-release#3279 |
Beta Was this translation helpful? Give feedback.
-
|
Any update on this? This is a very needed feature. Other solutions like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use case
Working on a project that utilizes devcontainer with a team. The preferences wrt to tooling differs among team members (zsh vs fish, vim vs neovim, etc.).
Current solution
make the devcontainer a union of all the requirments. I.e. install all tools, that any developer in the team favors.
Challenges
Potential Solution
includepropertyadd an optional property
includeto thee devcontainer spec. The value is a valid devcontainer file. When defined, the container described in that file will be the base for the focal definition. I.e. I can add my own tools on top of that definition.Base file: checked in the project repo, contains the project-wide standards (runtime, linting tools, etc.)
extending file: developer preferences, e.g. certain vscode plugins, editors, shells, etc.
Challenges
conflicts between base and extending definition (e.g. different image)
devcontainer extension file
To avoid the complexity of inheritance as above a special extension file format can be defined. This would be a subset of the devcontainer spec. The properties would only be able to append entries to the base file
example:
This would add
ms-azuretools.vscode-dockerto theparentBeta Was this translation helpful? Give feedback.
All reactions