Skip to content

Allow overriding host mount #601

Open

Description

I have a somewhat similar case to #295 and #497 where I have a "control" container managing child instances. The control container itself is also in Docker, so the workspace paths there don't correspond to host paths.

Things are mostly working, except I don't want to encode the host path details in the devcontainer.json (since they differ by env). A CLI option for the host's path would be a great addition.

Would it be possible / acceptable to add a CLI flag to override the host mount path configuration?

Note: I specifically want to avoid modifying the workspaceMount configuration in the underlying devcontainer.json because the host paths change dynamically with each restart.

Activity

  1. chrmarti commented on Jul 28, 2023

    @chrmarti
    Contributor

    You could pass the path to a modified (changing workspaceMount) copy of the devcontainer.json with --override-config. Relative paths in the copy would still be resolved against the original devcontainer.json's folder. The override config can, e.g., be in the temp folder.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions