Skip to content

Feature mounts schema rejects the --mount options the spec promises (e.g. volume-subpath) #781

Open

Description

@Hansehart

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions