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
- Extract system packages, Go, Go tools, and Node.js into base/Dockerfile
- Claude and codex Dockerfiles extend the base, each with its own username
- Pin gopls, delve, golangci-lint, and RTK to specific versions
- CI workflow builds base first, then sandboxes in parallel
- Add "Running standalone" section with credential and mount examples
- Add AGENTS.md, CLAUDE.md, .gitignore
.github/workflows/ CI: build-base then build-sandboxes (multi-arch)
23
+
```
24
+
25
+
## Build Commands
26
+
27
+
```bash
28
+
make # Build all images (base, claude, codex)
29
+
make base # Build base image only
30
+
make claude # Build claude sandbox (builds base first)
31
+
make codex # Build codex sandbox (builds base first)
32
+
make clean # Remove all images
33
+
make RUNTIME=docker # Use Docker instead of Podman
34
+
```
35
+
36
+
## Conventions
37
+
38
+
- All shared system-level dependencies (OS packages, Go, Go tools, Node.js) go in `base/Dockerfile`. User creation, RTK, and CLI installs go in each child Dockerfile.
39
+
- Each image has its own non-root user (UID 1000): `claude` for sandbox-claude, `codex` for sandbox-codex. Wallfacer hardcodes paths under `/home/claude/` and `/home/codex/` for volume mounts, so these usernames must not change.
40
+
- Major Go tools are pinned to specific versions via build ARGs. Utility tools use `@latest`.
41
+
- RTK version is pinned via the `RTK_VERSION` build ARG.
42
+
- Entrypoints handle RTK init at runtime (not build time) because the config volume is mounted at container start.
43
+
- The codex entrypoint translates Claude Code-style flags to Codex CLI format and emits a Claude Code-compatible JSON envelope.
Both images also include [RTK](https://github.com/rtk-ai/rtk), a token-optimized CLI proxy for reduced token usage.
30
-
31
32
## Using pre-built images
32
33
33
34
Pre-built multi-arch images are published to GHCR on every release:
@@ -47,15 +48,14 @@ Replace `podman` with `docker` if using Docker.
47
48
48
49
## Building locally
49
50
50
-
If you want to customize the images or build from source:
51
-
52
51
```bash
53
52
git clone https://github.com/latere-ai/images.git
54
53
cd images
55
54
56
-
make # Build both images
57
-
make claude # Build Claude sandbox only
58
-
make codex # Build Codex sandbox only
55
+
make # Build all images (base, claude, codex)
56
+
make base # Build base image only
57
+
make claude # Build Claude sandbox (builds base first)
58
+
make codex # Build Codex sandbox (builds base first)
59
59
make clean # Remove all images
60
60
```
61
61
@@ -67,13 +67,98 @@ make RUNTIME=docker
67
67
68
68
Built images are tagged as both `sandbox-claude:latest` (local) and `ghcr.io/latere-ai/sandbox-claude:latest` (registry name). Wallfacer finds images by the local name, so local builds work without any configuration change.
69
69
70
+
## Running standalone
71
+
72
+
You can run these images directly without Wallfacer. Each sandbox needs credentials and a workspace directory mounted into the container.
73
+
74
+
### Claude sandbox
75
+
76
+
Claude Code authenticates via either an OAuth token or an API key. Pass credentials through an env file and mount a named volume for Claude's config directory.
77
+
78
+
1. Create an env file (e.g. `~/.claude-sandbox.env`):
79
+
80
+
```
81
+
ANTHROPIC_API_KEY=sk-ant-...
82
+
```
83
+
84
+
Or, if using OAuth (from `claude setup-token`):
85
+
86
+
```
87
+
CLAUDE_CODE_OAUTH_TOKEN=your-oauth-token
88
+
```
89
+
90
+
2. Run the container:
91
+
92
+
```bash
93
+
docker run --rm -it \
94
+
--env-file ~/.claude-sandbox.env \
95
+
-v claude-config:/home/claude/.claude \
96
+
-v "$(pwd)":/workspace/myproject \
97
+
-w /workspace/myproject \
98
+
ghcr.io/latere-ai/sandbox-claude:latest \
99
+
-p "explain this project"
100
+
```
101
+
102
+
The named volume `claude-config` persists Claude's session data, settings, and CLAUDE.md cache between runs. The first run may take a moment while Claude Code initializes.
103
+
104
+
To start an interactive session instead of a one-shot prompt:
105
+
106
+
```bash
107
+
docker run --rm -it \
108
+
--env-file ~/.claude-sandbox.env \
109
+
-v claude-config:/home/claude/.claude \
110
+
-v "$(pwd)":/workspace/myproject \
111
+
-w /workspace/myproject \
112
+
--entrypoint claude \
113
+
ghcr.io/latere-ai/sandbox-claude:latest
114
+
```
115
+
116
+
### Codex sandbox
117
+
118
+
Codex authenticates via an API key passed through an env file. If you have logged in with `codex` on the host, you can also bind-mount the auth cache.
119
+
120
+
1. Create an env file (e.g. `~/.codex-sandbox.env`):
121
+
122
+
```
123
+
OPENAI_API_KEY=sk-...
124
+
```
125
+
126
+
2. Run the container:
127
+
128
+
```bash
129
+
docker run --rm -it \
130
+
--env-file ~/.codex-sandbox.env \
131
+
-v "$(pwd)":/workspace/myproject \
132
+
-w /workspace/myproject \
133
+
ghcr.io/latere-ai/sandbox-codex:latest \
134
+
-p "explain this project"
135
+
```
136
+
137
+
Or, if you have `~/.codex/auth.json` from a prior `codex` login on the host, mount it read-only instead of using an env file:
138
+
139
+
```bash
140
+
docker run --rm -it \
141
+
-v ~/.codex:/home/codex/.codex:ro \
142
+
-v "$(pwd)":/workspace/myproject \
143
+
-w /workspace/myproject \
144
+
ghcr.io/latere-ai/sandbox-codex:latest \
145
+
-p "explain this project"
146
+
```
147
+
148
+
### Notes
149
+
150
+
- Replace `docker` with `podman` if preferred.
151
+
- The `-p "..."` flag passes a one-shot prompt. The entrypoint translates this into the appropriate CLI invocation.
152
+
- Mount additional project directories as needed under `/workspace/`.
153
+
- To limit resources: `--cpus 2 --memory 4g`.
154
+
70
155
## Entrypoint contract
71
156
72
-
Wallfacer expects the following from sandbox images:
157
+
These details are relevant if you are building custom images on top of the sandboxes or integrating them into your own orchestration.
73
158
74
159
-**Working directory**: `/workspace` (workspaces are mounted as subdirectories)
0 commit comments