Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this is currently allowed by the CLI, however, this is an old syntax that shouldn't be used anymore. (This might be deprecated soon)
https://github.com/devcontainers/cli/blob/2a6ab1ac82f4917654205e2a9b1ac928260d902e/.devcontainer/devcontainer.json#L15 definitely needs to updated to use the new syntax 🤦♀️
We don't mention supporting
stringformountsin https://containers.dev/implementors/features/ and https://containers.dev/implementors/json_schema/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that
https://containers.dev/implementors/json_schema/does not synced with theschema.jsonhttps://github.com/devcontainers/spec/blob/87e7ce0a2e25264032e836a3c5379692491e9d4b/schemas/devContainer.base.schema.json#L236-L246And you're right, the feature's schema is defined as
Mount[]only.So how about consider this as spec issues:
mounts's type between template and featuremountswith strict type is a good thing, but currently it only supporttype,sourceandtarget, and docker bind mounts have more options, would it be better to define them all? For example,readonlyis really useful: https://github.com/search?q=path%3Adevcontainer.json+%2F%22%5B%5E%22%5D*type%3D%28bind%7Cvolume%29%5B%5E%22%5D*readonly%5B%5E%22%5D*%22%2F&type=codeUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing your thoughts!
Makes sense to me 👍