Skip to content

Add ability to define mounts during start - #10

Open
myles-anderson-ox wants to merge 1 commit into
luixaviles:mainfrom
myles-anderson-ox:add-mount-support
Open

Add ability to define mounts during start#10
myles-anderson-ox wants to merge 1 commit into
luixaviles:mainfrom
myles-anderson-ox:add-mount-support

Conversation

@myles-anderson-ox

Copy link
Copy Markdown

Add --mount support to nebubox start

Why: nebubox start only ever mounted the project directory and the tool's auth files, with no way to expose additional host paths to the container. Anything else a session needed, such as other repositories in other directories, was inaccessible. This is particularly helpful on MacOS where mount --bind does not exist and there is not another well supported, secure way to do it.

What changed:

  • Added a repeatable --mount [:][:ro|rw] flag to nebubox start.
  • The destination is optional and defaults to /home/coder/workspace/ (alongside the project). A relative dest is placed under the workspace; an absolute dest (e.g. /home/coder/.aws) is used verbatim. The middle segment is treated as the mode only when it's exactly ro/rw.
  • Host paths are validated (must exist; resolved to absolute) via a new validateMount helper, and parseArgs now accumulates repeated flags so --mount can be given multiple times.
  • Mounts are applied at container creation; starting an existing container warns that --rebuild is needed to change them.
  • Updated help text, README, and CHANGELOG; added unit tests for parsing, validation (all shorthand forms), and the container -v wiring.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant