Addition of "extends" top level property to enable simple configuration inheritance
# Problem Multiple teams collaborating on a common codebase may have different dependency or setup needs and currently this is done by sharing a single `devcontainer.json` configuration with all of their individual needs combined. https://github.com/microsoft/dev-container-spec/issues/6 describes support for multiple configuration files, but there isn't set a way to consolidate the shared configuration into a single file. # Proposed Solution Introduce a new top level key `"extends"` with a value that is a relative a file path within the same repository to a "parent" devcontainer configuration. The configurations will be merged using the [same rules applied by a Docker Compose overrides file](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration). ```json5 // .devcontainer/defaults.json { "name": "example/project", "forwardPorts": [80, 5432], "hostRequirements": { "storage": "64gb", "memory": "16gb" } } // .devcontainer/devcontainer.json { "extends": "./defaults.json", "forwardPorts": [2222], "hostRequirements": { "memory": "32gb" }, "onCreateCommand": ".devcontainer/on-create-command.sh", } // Results in { "name": "example/project", "forwardPorts": [80, 5432, 2222], // <-- Array values are the UNION "hostRequirements": { "storage": "64gb", "memory": "32gb" // <-- Basic types overwrite }, "onCreateCommand": ".devcontainer/on-cre
Posted by greggroth on Mar 25, 2022, 7:00 PM
Tags
Related issues
- Add 65536 size support for maps
- TypeScript 7.1 Iteration Plan
- nvim-treeconfig: upstream nvim-treesitter
- Add the "action" and "method" attributes to <button>
- [FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
- > We were imposed GitHub for so many exercises!
Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments
support (Software)
Add 65536 size support for maps
TypeScript 7.1 Iteration Plan
nvim-treeconfig: upstream nvim-treesitter
Add the "action" and "method" attributes to <button>
[FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
> We were imposed GitHub for so many exercises!
Add support for Visual Studio 2026 Integration
Support for Helm v4
Addition of "extends" top level property to enable simple configuration inheritance
# Problem Multiple teams collaborating on a common codebase may have different dependency or setup needs and currently this is done by sharing a single `devcontainer.json` configuration with all of their individual needs combined. https://github.com/microsoft/dev-container-spec/issues/6 describes support for multiple configuration files, but there isn't set a way to consolidate the shared configuration into a single file. # Proposed Solution Introduce a new top level key `"extends"` with a value that is a relative a file path within the same repository to a "parent" devcontainer configuration. The configurations will be merged using the [same rules applied by a Docker Compose overrides file](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration). ```json5 // .devcontainer/defaults.json { "name": "example/project", "forwardPorts": [80, 5432], "hostRequirements": { "storage": "64gb", "memory": "16gb" } } // .devcontainer/devcontainer.json { "extends": "./defaults.json", "forwardPorts": [2222], "hostRequirements": { "memory": "32gb" }, "onCreateCommand": ".devcontainer/on-create-command.sh", } // Results in { "name": "example/project", "forwardPorts": [80, 5432, 2222], // <-- Array values are the UNION "hostRequirements": { "storage": "64gb", "memory": "32gb" // <-- Basic types overwrite }, "onCreateCommand": ".devcontainer/on-cre
Comments (0)
No comments yet. Start the discussion.