blob: 4a55f4233c6d0f70a0c436f0b455f40374e4a06e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
claude-vm
=========
Run Claude Code in isolated Incus containers with automatic mounting and ID mapping.
## Prerequisites
- Incus installed and initialized (`sudo incus admin init`)
- User added to `incus-admin` group
### UID/GID Mapping
Edit `/etc/subuid` and `/etc/subgid` to allow root to map your user's UID/GID:
```
root:1000:1
root:100000:65536
```
Replace `1000` with your actual UID (`id -u`).
## Installation
```bash
sudo ln -s $(pwd)/claude-vm /usr/local/bin/claude-vm
sudo cp claude-vm.1 /usr/local/share/man/man1/
```
## Quick Start
```bash
# Run claude in a new container with current directory mounted
claude-vm --rw .
# Use a custom image
claude-vm --image claude-vm-ubuntu-full --rw .
# Run with macvlan networking for direct network access
claude-vm --network macvlan --rw .
```
## Images
Pre-built images are available in `images/`. Build them with:
```bash
# Ubuntu (base and full)
./images/ubuntu/build.sh
# Arch Linux (base only)
./images/archlinux/build.sh
```
Images are exported to both Docker and Incus with names like `claude-vm-ubuntu-base`.
## Configuration
Create `~/.claude/CLAUDE-VM.md` to customize the system prompt passed to Claude.
## See Also
`man claude-vm` for full documentation.
|