Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readonly mount #511

Open
JackCaster opened this issue Oct 21, 2024 · 1 comment
Open

readonly mount #511

JackCaster opened this issue Oct 21, 2024 · 1 comment

Comments

@JackCaster
Copy link

the mount property in the devcontainer.json as described here https://containers.dev/implementors/json_reference/#general-properties accepts a list of <property>:<value>. How can I flag the mount to be readonly using this type of definition?

Most often, the mount instruction is a one-liner (https://code.visualstudio.com/remote/advancedcontainers/add-local-file-mount), and in that case I can specify the readonly flag like

"mounts": ["source=...,target=...,type=bind,readonly]
@JackCaster
Copy link
Author

I can workaround the limitation with

"mounts": [
    {
      "source": "...",
      "target": "...",
      "type": "bind,readonly",
    }
  ]

but in this case the linter will complain that the property type is not correct

Value is not accepted. Valid values: "bind", "volume".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant