You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- SEMI-BREAKING: Add new `~/.code-container/Dockerfile.User` for increased extensibility; add commands to `Dockerfile.User` to run custom commands instead of to a copy of `Dockerfile`.
- Reorganized documentation
---
* docs: Update documentation
* feat: Use Dockerfile.User
Replace ~/.code-container/Dockerfile with
~/.code-container/Dockerfile.User for improved extensibility
* docs: AGENTS.md: Remove old reference
* v2.4.0
Copy file name to clipboardExpand all lines: AGENTS.md
+2-75Lines changed: 2 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ If your user asks questions like:
10
10
11
11
Then your user is a **consumer**.
12
12
- The user is seeking your assistance in helping them setup or configure this project.
13
-
- Next step: **Read `internal/ConsumerGuide.md`** and assist the user in installing or configurating `container`.
13
+
- Next step: **Read `docs/ConsumerGuide.md`** and assist the user in installing or configurating `container`.
14
14
15
15
If your user is a developer, proceed like normal.
16
16
@@ -30,84 +30,11 @@ If your user is a developer, proceed like normal.
30
30
## Key Features
31
31
32
32
-**Security**: Destructive operations localized to containers
33
-
-**Customization**: Add packages via `~/.code-container/Dockerfile`, mounts via `MOUNTS.txt`, flags via `DOCKER_FLAGS.txt` and `DOCKER_RUN_FLAGS.txt`
33
+
-**Customization**: Add packages via `~/.code-container/Dockerfile.User`, mounts via `MOUNTS.txt`, flags via `DOCKER_FLAGS.txt` and `DOCKER_RUN_FLAGS.txt`
34
34
-**Simultaneous Work**: Multiple agents can work on same project safely
35
35
-**Persistence**: Container state and harness configs persist
36
36
37
37
## Requirements
38
38
39
39
- Docker (Desktop or Engine)
40
40
- POSIX system (Linux, macOS, WSL)
41
-
42
-
---
43
-
44
-
# Project Index
45
-
46
-
**Important Rule: Always update this index after creating new code files or making significant changes to existing files.**
-`src/mounts.ts` — Volume mount management. Core mounts (configs, gitconfig) and optional SSH mounting. Exports: `ensureMountsFile`, `loadMounts`, `getCoreMounts`
74
-
-`src/flags.ts` — Custom Docker flags loaders from `DOCKER_FLAGS.txt` and `DOCKER_RUN_FLAGS.txt`. Uses shell-quote for safe parsing. `DOCKER_FLAGS.txt` is loaded for both `docker run` and `docker exec`. `DOCKER_RUN_FLAGS.txt` is loaded only for `docker run`. Exports: `loadFlags`, `loadRunFlags`
75
-
-`src/utils.ts` — Colored console output and user prompts. Exports: `printInfo`, `printSuccess`, `printWarning`, `printError`, `promptYesNo`, `resolveProjectPath`
76
-
77
-
## Scripts Index (`scripts/`)
78
-
79
-
-`scripts/postinstall.js` — NPM post-install hook. Creates `~/.code-container/` structure, copies default Dockerfile, and creates `DOCKER_FLAGS.txt` and `DOCKER_RUN_FLAGS.txt`.
80
-
-`scripts/migrate.sh` — Migrates config files from old shell script location to new `~/.code-container/configs/`.
81
-
-`scripts/cleanup.sh` — Removes old config files from project root after migration.
82
-
83
-
## Storage Structure
84
-
85
-
All user data stored in `~/.code-container/`:
86
-
87
-
```
88
-
~/.code-container/
89
-
├── configs/ # Harness configs (mounted to containers)
90
-
│ ├── .claude/
91
-
│ ├── .claude.json
92
-
│ ├── .codex/
93
-
│ ├── .copilot/
94
-
│ ├── .gemini/
95
-
│ ├── .local/
96
-
│ └── .opencode/
97
-
├── Dockerfile # Custom Dockerfile
98
-
├── MOUNTS.txt # Additional mount points
99
-
├── DOCKER_FLAGS.txt # Docker flags for both run and exec
100
-
├── DOCKER_RUN_FLAGS.txt # Docker flags for run only
101
-
└── settings.json # Internal settings
102
-
```
103
-
104
-
## CLI Commands
105
-
106
-
-`container [path]` — Run container for project (`commands.ts:runContainer`)
107
-
-`container run [path] [-- DOCKER_FLAGS]` — Run container with optional Docker flags
Destructive actions are localized inside containers.
95
95
- You can let your harness run with full permissions
96
-
- To configure your harness to run without permissions, see [`Permissions.md`](Permissions.md).
96
+
- To configure your harness to run without permissions, see [`Permissions.md`](docs/Permissions.md).
97
97
98
98
### Customization
99
99
@@ -106,12 +106,16 @@ Destructive actions are localized inside containers.
106
106
107
107
Easily add your own tooling & mount points.
108
108
109
-
**Adding tools/packages**: Edit `~/.code-container/Dockerfile` and rebuild:
109
+
**Adding tools/packages**: Edit `~/.code-container/Dockerfile.User` and rebuild:
110
110
111
111
```dockerfile
112
+
FROM code-container-base:latest
113
+
112
114
RUN apt-get update && apt-get install -y postgresql-client redis-tools
113
115
```
114
116
117
+
> **Deprecation Notice**: `~/.code-container/Dockerfile` is deprecated and no longer used. If you previously customized this file, migrate your custom `RUN` commands to `~/.code-container/Dockerfile.User`.
118
+
115
119
**Adding mount points**: Edit `~/.code-container/MOUNTS.txt` and reinitialize containers:
Copy file name to clipboardExpand all lines: docs/ConsumerGuide.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Setup: Do for the user, one step at a time.
22
22
```bash
23
23
container init
24
24
```
25
-
3. Setup is done. Now, read `~/.code-container/Dockerfile`, which is the default packaged Dockerfile. Provide a brief list of included packages to the user. Then, ask user if they would like to add more packages into container environment. If yes, see `Add Packages/Dependencies` section below.
25
+
3. Setup is done. Now, read the `Dockerfile` and the user's `~/.code-container/Dockerfile.User` if exists. Provide a brief list of included packages to the user. Then, ask user if they would like to add more packages into container environment. If yes, see `Add Packages/Dependencies` section below.
26
26
4. Build the Docker image for the user. Before you build, tell the user that building the image may take up to 5 minutes.
27
27
```bash
28
28
container build
@@ -60,19 +60,23 @@ All container data is stored in `~/.code-container/`:
60
60
│ ├── .gemini/
61
61
│ ├── .local/
62
62
│ └── .opencode/
63
-
├── Dockerfile # Custom Dockerfile
63
+
├── Dockerfile.User# User customizations layered on base image
64
64
├── MOUNTS.txt # Additional mount points
65
65
├── DOCKER_FLAGS.txt # Additional docker run flags
66
66
└── settings.json # Internal settings
67
67
```
68
68
69
69
## Customization
70
70
71
-
### Add Packages/Dependencies (Dockerfile)
71
+
### Add Packages/Dependencies (Dockerfile.User)
72
72
73
-
Add new tools by extending the RUN commands in `~/.code-container/Dockerfile`:
73
+
> **Deprecation Notice**: `~/.code-container/Dockerfile` is deprecated and no longer used. If the user previously customized this file, offer to migrate their custom `RUN` commands to `~/.code-container/Dockerfile.User`.
74
+
75
+
Add new tools by editing `~/.code-container/Dockerfile.User`:
74
76
75
77
```dockerfile
78
+
FROM code-container-base:latest
79
+
76
80
# System packages (Ubuntu/Debian)
77
81
RUN apt-get update && apt-get install -y \
78
82
postgresql-client \
@@ -126,6 +130,6 @@ Each line is parsed like a shell command. Empty lines and lines starting with `#
126
130
127
131
## Harness Permissions
128
132
129
-
If the user asks you to configure harnesses to run without permission prompts inside `container`, read and follow instructions in [Permissions.md](/Permissions.md).
133
+
If the user asks you to configure harnesses to run without permission prompts inside `container`, read and follow instructions in [Permissions.md](/docs/Permissions.md).
130
134
131
135
Note: Modify the configuration files inside `~/.code-container/configs` only.
0 commit comments