Feature `mounts` schema rejects the `--mount` options the spec promises (e.g. `volume-subpath`)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 53/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, docker-compose, json
- 领域
- build-system, devtools
调研方向
Start with the Mount definition around line 314 of schemas/devContainerFeature.schema.json and compare it with the feature spec’s description of Docker --mount options. Then trace where feature mounts are converted for docker run and Compose; the issue points to devcontainers/cli#881 and #1314 for related readonly behavior. Done means the schema accepts the requested options and implementations pass them through to both Docker and Compose.
由索引模型根据 Issue 内容生成。
描述
The features spec says each mounts entry "accepts the same values as the Docker CLI --mount flag" (devcontainer-features.md), but the schema only allows three keys. Mount in schemas/devContainerFeature.schema.json (line 314) is an object with source, target and type, and "additionalProperties": false. So options like readonly or volume-subpath can't be declared by a feature.
Use case: several features sharing one named volume, each mounting only its own subfolder, which Docker supports since Engine 26.0 and Compose since 2.26.0:
"mounts": [{ "source": "programs", "target": "/opt/texlive", "type": "volume", "volume-subpath": "texlive" }]
Proposal: allow the --mount options in the Mount schema (at least readonly and volume-subpath), and have implementations pass them through to docker run --mount and to Compose's long volume syntax.
Related: #754 (string vs. object mounts), devcontainers/cli#881 and devcontainers/cli#1314 (the CLI drops readonly).
- 主要语言
- 没有语言数据
- 星标
- 5.8k
- 派生
- 505
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
devcontainers/spec 的其他 Issue
-
CLI sorts Feature options fewest-first, against spec可能已有人在做 @nozaq 于 98 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
devcontainers/spec#755 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
devcontainers/spec#754 · 1 条评论 · 2 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 64/100
devcontainers/spec#735 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 62/100
devcontainers/spec#579 · 1 条评论 ·
-
Questions未关闭
难度 1/5 1 小时以内 新手友好度 1/100
devcontainers/spec#783 ·
查看 devcontainers/spec 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
RobLoach/raylib-cpp#440 · 2 条评论 ·
-
Unused default client is retained when importing FetchError可能已有人在做 @onmax 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823未关闭bug dependencies
难度 2/5 1-3 小时 新手友好度 70/100
AxaFrance/design-system#2064 ·
维护者通常 3 天内回复
-
The `next-js` export condition isn't set, so packages like next-sanity load their non-Next build未关闭
难度 2/5 1-3 小时 新手友好度 70/100
cloudflare/vinext#4302 ·
维护者通常 1 天内回复