devcontainers / devcontainers/spec

compose yaml mounts don't override conflicting metadata mounts

Aperta
#563 9 commenti 1 reazione 1 assegnatario Rivendicata da @chrmarti Vedi su GitHub
enhancement
Lingua principale
Nessun dato sulla lingua
Stelle
5.7k
Fork
498
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.