Skip to content

Pass non-bind/volume --mount values to the container runtime - #1353

Open
Aleksei Gmitron (agmitron) wants to merge 1 commit into
devcontainers:mainfrom
agmitron:1352
Open

Aleksei Gmitron (agmitron) wants to merge 1 commit into
devcontainers:mainfrom
agmitron:1352

Conversation

@agmitron

Copy link
Copy Markdown

devcontainer up --mount only accepted
type=<bind|volume>,source=,target=[,external=] and rebuilt the value as type=,src=,dst=, so type=image, subpath, readonly, tmpfs and other runtime options were rejected or dropped.

Values in the bind/volume form keep being parsed as before. Any other value is now passed to --mount of the runtime verbatim, the same way string entries in devcontainer.json mounts are. The Docker Compose path converts mounts to the short source:target syntax, so it rejects such a value with an explicit error instead of silently losing its options.

Fixes #1352

`devcontainer up --mount` only accepted
`type=<bind|volume>,source=,target=[,external=]` and rebuilt the value as
`type=,src=,dst=`, so `type=image`, `subpath`, `readonly`, `tmpfs` and other
runtime options were rejected or dropped.

Values in the bind/volume form keep being parsed as before. Any other value
is now passed to `--mount` of the runtime verbatim, the same way string
entries in `devcontainer.json` `mounts` are. The Docker Compose path converts
mounts to the short `source:target` syntax, so it rejects such a value with
an explicit error instead of silently losing its options.

Fixes devcontainers#1352

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agmitron
Aleksei Gmitron (agmitron) requested a review from a team as a code owner November 6, 2026 18:16
@agmitron

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

devcontainer up --mount rejects type=image and mount options such as subpath

1 participant