Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion claude-code/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ COPY --from=ralphex-download /usr/local/bin/ralphex /usr/local/bin/ralphex
# 1. System deps (install-deps) — heavy, needs root, version-stable across
# nearby releases. Baked into the image so projects don't need sudo.
# 2. Browser binary (install --only-shell) — light, version-specific.
# Baked as a cache; projects MUST run `npx playwright install --only-shell`
# Baked as a cache; projects MUST run `npx playwright install --only-shell chromium`
# at container creation to ensure the binary matches their @playwright/test.
# That command is idempotent: no-op when versions match, ~10s download if not.
USER root
Expand Down
2 changes: 1 addition & 1 deletion claude-code/.devcontainer/claude-sandbox/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
},
// Runs before postStartCommand (firewall), so network is still available for browser downloads.
// The find command chowns all node_modules volume mount points in one pass.
"postCreateCommand": "sudo find /workspace -maxdepth 4 -name node_modules -type d -exec chown node {} + && sudo chown -R node /home/node/.claude && mise install && bun install && npx playwright install --only-shell",
"postCreateCommand": "sudo find /workspace -maxdepth 4 -name node_modules -type d -exec chown node {} + && sudo chown -R node /home/node/.claude && mise install && bun install && npx playwright install --only-shell chromium",
// Firewall init — script is bind-mounted from the project
"postStartCommand": "sudo /usr/local/bin/init-firewall.sh",
"waitFor": "postStartCommand"
Expand Down
2 changes: 1 addition & 1 deletion claude-code/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@
// mise install reads .mise.toml and installs project-specific tool versions.
// playwright install ensures the correct browser binary for the project's @playwright/test version
// (idempotent — skips download if the image's cached binary already matches).
"updateContentCommand": "sudo find /workspace -maxdepth 4 -name node_modules -type d -exec chown node {} + && sudo chown -R node /home/node/.claude && mise install && bun install && npx playwright install --only-shell",
"updateContentCommand": "sudo find /workspace -maxdepth 4 -name node_modules -type d -exec chown node {} + && sudo chown -R node /home/node/.claude && mise install && bun install && npx playwright install --only-shell chromium",
"waitFor": "postCreateCommand"
}
6 changes: 3 additions & 3 deletions claude-code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ bun add -d @playwright/test # or: npm install -D @playwright/test
**One-time project setup** — add this to your container creation command (`updateContentCommand` or `postCreateCommand`, as shown in [Quick Start](#quick-start)):

```bash
npx playwright install --only-shell
npx playwright install --only-shell chromium
```

This is **idempotent** — if the cached binary already matches, it's a no-op (~0s). If the project's `@playwright/test` version differs from the image, it downloads the correct binary (~10s, once at container creation).
Expand Down Expand Up @@ -316,7 +316,7 @@ docker buildx build \
Pull image ──────────────────────── (cached)
mise install (bun, hugo, etc.) ──── (~15s, downloads pre-built binaries)
bun install ─────────────────────── (~15s, cached in named volume)
playwright install --only-shell ─── (~0s, binary already cached — no-op)
playwright install --only-shell chromium (~0s, binary already cached — no-op)
project setup ───────────────────── (db:migrate, init-plugins, etc.)
Total: ~45s warm
```
Expand All @@ -326,7 +326,7 @@ project setup ───────────────────── (d
Pull image ──────────────────────── (cached)
mise install (bun, hugo, etc.) ──── (~15s)
bun install ─────────────────────── (~15s)
playwright install --only-shell ─── (~10s, downloads correct browser binary)
playwright install --only-shell chromium (~10s, downloads correct browser binary)
project setup ───────────────────── (db:migrate, init-plugins, etc.)
Total: ~55s warm
```
Expand Down