feat(sandcastle): Dockerfile installs Claude Code CLI for subscription auth
This commit is contained in:
@@ -1,14 +1,26 @@
|
|||||||
# Minimal sandbox for sandcastle dispatch.
|
# Sandcastle sandbox image — runs the implementer + reviewer agents.
|
||||||
# Will be extended once the CI image is identified (see ADR-future).
|
#
|
||||||
|
# Includes Claude Code CLI so the sandbox can authenticate via the host's
|
||||||
|
# mounted ~/.claude/ session (sandcastle issue #191 workaround — subscription
|
||||||
|
# auth, not API-key auth, is our primary flow). Falls back to ANTHROPIC_API_KEY
|
||||||
|
# when no host credentials are available.
|
||||||
|
|
||||||
FROM node:22-bookworm-slim
|
FROM node:22-bookworm-slim
|
||||||
|
|
||||||
# pnpm via corepack (matches the repo's pnpm version)
|
# pnpm via corepack (matches the repo's pnpm version)
|
||||||
RUN corepack enable && corepack prepare pnpm@9 --activate
|
RUN corepack enable && corepack prepare pnpm@9 --activate
|
||||||
|
|
||||||
|
# Claude Code CLI — used by sandcastle's claudeCode() agent provider.
|
||||||
|
# The CLI reads credentials from ~/.claude/ inside the container; the host
|
||||||
|
# mounts its ~/.claude/ over that path at sandbox start.
|
||||||
|
RUN npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
|
# Minimal system deps for git operations + healthchecks.
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
# Repo files are mounted by sandcastle at /workspace at runtime.
|
|
||||||
# The agent runs `pnpm install --frozen-lockfile` as its first step
|
|
||||||
# per the implementer prompt template.
|
|
||||||
|
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
||||||
|
|||||||
Reference in New Issue
Block a user