Allow for inheritance of devcontainer spec #9
benjaminbauer
started this conversation in
Ideas
Replies: 2 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.
2 replies
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
include
propertyadd an optional property
include
to 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-docker
to theparent
Beta Was this translation helpful? Give feedback.
All reactions