Skip to content

Commit 84a3aa4

Browse files
dguidoclaude
andauthored
Document file sharing options and missing CLI commands (#22)
Add File Sharing section covering VS Code drag-and-drop and devc mount. Add exec, upgrade, and mount to the CLI commands table. Expand the Container Details table with volume mount paths and host mounts. Closes #10 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 74d87a5 commit 84a3aa4

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,34 @@ devc up Start the devcontainer
122122
devc rebuild Rebuild container (preserves persistent volumes)
123123
devc down Stop the container
124124
devc shell Open zsh shell in container
125+
devc exec CMD Execute command inside the container
126+
devc upgrade Upgrade Claude Code in the container
127+
devc mount SRC DST Add a bind mount (host → container)
125128
devc template DIR Copy devcontainer files to directory
126129
devc self-install Install devc to ~/.local/bin
127130
```
128131

132+
## File Sharing
133+
134+
### VS Code / Cursor
135+
136+
Drag files from your host into the VS Code Explorer panel — they are copied into `/workspace/` automatically. No configuration needed.
137+
138+
### Terminal: `devc mount`
139+
140+
To make a host directory available inside the container:
141+
142+
```bash
143+
devc mount ~/drop /drop # Read-write
144+
devc mount ~/secrets /secrets --readonly
145+
```
146+
147+
This adds a bind mount to `devcontainer.json` and recreates the container. Existing mounts are preserved across `devc template` updates.
148+
149+
**Tip:** A shared "drop folder" is useful for passing files in without mounting your entire home directory.
150+
151+
> **Security note:** Avoid mounting large host directories (e.g., `$HOME`). Every mounted path is writable from inside the container unless `--readonly` is specified, which undermines the filesystem isolation this project provides.
152+
129153
## Network Isolation
130154

131155
By default, containers have full outbound network access. For stricter security, use iptables to restrict network access.
@@ -172,7 +196,8 @@ The container auto-configures `bypassPermissions` mode—Claude runs commands wi
172196
| Base | Ubuntu 24.04, Node.js 22, Python 3.13 + uv, zsh |
173197
| User | `vscode` (passwordless sudo), working dir `/workspace` |
174198
| Tools | `rg`, `fd`, `tmux`, `fzf`, `delta`, `iptables`, `ipset` |
175-
| Volumes (survive rebuilds) | Command history, Claude config, GitHub CLI auth |
199+
| Volumes (survive rebuilds) | Command history (`/commandhistory`), Claude config (`~/.claude`), GitHub CLI auth (`~/.config/gh`) |
200+
| Host mounts | `~/.gitconfig` (read-only), `.devcontainer/` (read-only) |
176201
| Auto-configured | [anthropics](https://github.com/anthropics/claude-code-plugins) + [trailofbits](https://github.com/trailofbits/claude-code-plugins) skills, git-delta |
177202

178203
Volumes are stored outside the container, so your shell history, Claude settings, and `gh` login persist even after `devc rebuild`. Host `~/.gitconfig` is mounted read-only for git identity.

0 commit comments

Comments
 (0)