Add read-configuration
subcommand to output a merged devcontainer configuration
#210
Labels
enhancement
New feature or request
Note: If we implement option 1 from #211, we could punt this feature for the time being.
This feature is a pre-requisite for generating a computed
devcontainer.json
for use by e.g. coder modules. This can help resolve issues like #68 where a list of extensions needs to be available during installation ofvscode
,code-server
, etc.This commands main purpose is to output a merged configuration based on the projects
devcontainer.json
as well as configuration introduced by features.A logical approach would be to mimic
@devcontainer/cli
output. Doing so would makeenvbuilder
a versatile tool for interpreting devcontainer features, and potentially a drop-in single binary alternative.Here's an example output from
@devcontainer/cli
when run against themicrosoft/vscode
repo.devcontainer read-configuration --include-merged-configuration --log-format json --workspace-folder /tmp/envbuilder/vscode
Under
.configuration
the only new field is.configuration.configFilePath
. Otherwise this is the projectdevcontainer.json
as-is. The rest:.workspace
,.featuresConfiguration
and.mergedConfiguration
are all added byread-configuration
(and the merged config flag).For this issue, we're mainly interested in implementing
.mergedConfiguration
.Reference:
Logs (for reference)
The text was updated successfully, but these errors were encountered: