| 1 | # The sandbox a hosted attempt runs in: git, Claude Code, and the g1t runner. |
| 2 | # Build context: the repository root. |
| 3 | |
| 4 | # The same Debian release as the runtime image, so glibc matches. |
| 5 | FROM rust:1-slim-bookworm AS build |
| 6 | WORKDIR /src |
| 7 | COPY Cargo.toml Cargo.lock ./ |
| 8 | COPY crates crates |
| 9 | COPY services services |
| 10 | RUN cargo build --release --package g1t-runner |
| 11 | |
| 12 | FROM node:22-bookworm-slim |
| 13 | RUN apt-get update \ |
| 14 | && apt-get install -y --no-install-recommends git ca-certificates \ |
| 15 | && rm -rf /var/lib/apt/lists/* \ |
| 16 | && npm install --global @anthropic-ai/claude-code \ |
| 17 | && mkdir /work && chown node:node /work |
| 18 | COPY --from=build /src/target/release/g1t-runner /usr/local/bin/g1t-runner |
| 19 | # Claude Code refuses to skip permission prompts as root. |
| 20 | USER node |
| 21 | ENV HOME=/home/node |
| 22 | ENTRYPOINT ["g1t-runner"] |