devcontainers / devcontainers/spec
compose yaml mounts don't override conflicting metadata mounts
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
When you build an image using devcontainers with mount `/pathA:/pathA` and then reference that image in a compose file, then using that compose file in a separate devcontainer.json with mount `/pathB:/pathA`, the mount in compose.yaml doesn't take precedence over the mount from the metadata, and the resulting container has the (incorrect) mount `/pathA:/pathA`.
The [spec](https://containers.dev/implementors/spec/#merge-logic) for `mounts` says:
> Collected list of all mountpoints. Conflicts: Last source wins.
Which isn't the case. I created a minimally reproducible example https://github.com/Achllle/repro_devc_metadata with instructions and logs.
Contributor guide
Assessment
This issue has not been assessed yet.