diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5e8a49ed..67f78f00 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -372,6 +372,18 @@ tasks.named("javadoc") { (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") } +// The container image used for Claude eval sessions (see +// ClaudeEvalContainer). Built on demand -- `./gradlew claudeEvalImage` -- +// against whatever `docker` context is active (Colima on macOS, a local or +// remote daemon on Linux). Not wired into the regular build: it is a host +// setup step, not a per-checkout artifact, and it needs a running daemon. +tasks.register("claudeEvalImage") { + group = "build" + description = "Builds the drydock-claude-eval Docker image for Claude eval sessions." + workingDir = file("src/main/docker/claude-eval") + commandLine("docker", "build", "-t", "drydock-claude-eval:latest", ".") +} + // Central Portal Publisher API transport + signing for the custom `drydock` // publication created above. Credentials come from Gradle properties / env // (ORG_GRADLE_PROJECT_mavenCentralUsername/Password) and the in-memory GPG key diff --git a/app/src/main/docker/claude-eval/Dockerfile b/app/src/main/docker/claude-eval/Dockerfile new file mode 100644 index 00000000..b586dd9d --- /dev/null +++ b/app/src/main/docker/claude-eval/Dockerfile @@ -0,0 +1,32 @@ +# The container image used for Claude eval sessions (see +# ClaudeEvalContainer). Runs Claude Code's native Linux build inside a +# container so a seeded local settings file can carry the eval-specific +# x-target-account header, which the host's managed settings (locked to +# the highest precedence scope) forbid us from adding. +# +# Build on demand: ./gradlew claudeEvalImage +# (uses whatever `docker` context is active -- Colima on macOS, a local or +# remote daemon on Linux). + +FROM debian:bookworm-slim + +# git: Claude's own Bash tool calls `git`; the worktree's .git points back +# into the main repo object store, both mounted from the host. +# curl + ca-certificates: the native installer downloads over HTTPS. +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates curl git \ + && rm -rf /var/lib/apt/lists/* + +# Claude Code native build. The install script places the launcher at +# ~/.local/bin/claude and the versioned binary under ~/.local/share/claude. +# Runs as root in this image, so HOME=/root. +RUN curl -fsSL https://claude.ai/install.sh | bash + +ENV PATH="/root/.local/bin:${PATH}" + +# The inner `claude ...` command arrives as an entrypoint script mounted from +# the host (ClaudeEvalContainer.wrap writes it into the config-dir mount). +# This image's ENTRYPOINT is `sh`, so `docker run