feat(cli): add extra bind mounts for suave docker run - #178
Merged
Merged
Conversation
Add an extra_mounts list setting and `suave docker mount add|remove|list` so packages outside the checkout (e.g. a managing system under the workspace src/) can be mounted into the SUAVE container by default. `suave docker run --mount` adds a one-off mount and `--no-extra-mounts` skips the saved ones. Config normalization only checks entry syntax; host existence and destination overlap are checked in `docker run` and `mount add`, so a deleted mount source does not break unrelated commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds user-configurable extra bind mounts to the
suaveCLI:Why
Mounting a package from outside the checkout (e.g. a managing system in the enclosing workspace) previously needed
suave docker run -- -v a:b, which wasn't persisted and made the mount-drift check warn on every later run.How
kind='list'forKeySpec, newextra_mountskey (stored as a multi-line INI value; newline or comma separated forconfig set),Settings.get_list(), list rendering inconfig show.normalize()checks syntax only:HOST:CONTAINER, both absolute.build_mounts()is split intodefault_mounts()+extra_mounts().check_extra_mounts()requires an existing host path (Docker would otherwise create a root-owned folder), and rejects destinations that equal, nest inside, or contain another active mount's destination. It runs only indocker runandmount add.Path.resolve()so they compare equal todocker inspect's mount sources, which keeps the existing drift warning accurate.mount add/removeprint a--recreatehint when the container already exists.mount removetolerates a malformed config so a bad entry can be removed.Reviewer notes
suave build,config show, etc. A test covers this.:ro) support and no env var. Both were left out to keep scope small.suave_cli/README.md,docs/source/cli.md,CLAUDE.md,AGENTS.md, CLI help epilogs.Testing
suave self-test: 149 passed, flake8/pep257 clean. New tests cover list normalization, the INI round trip, build/validation of mounts, and the fullmount add/list/removeflow throughmain.main.--dry-run docker run. I haven't tried a realdocker runwith an extra mount.🤖 Generated with Claude Code