iterate.com / kernel

git clone https://git.iterate.com/repos/kernel

kernel / core / mind-worker / images / iterate-dev-image / Dockerfilemain at 949894f

# iterate-dev-image: built and pushed by Alchemy at deploy (core/alchemy/src/stack.ts), or copied
# from its published build (core/alchemy/src/sandbox-image.ts). The image a sandbox starts from
# (core/mind-worker/src/sandbox): Cloudflare's own `cloudflare/debian-trixie`
# (this base, pinned by version) plus the tools a dev machine needs, so a sandbox runs `git`, `gh`,
# Chromium, the agent CLIs and the mind's own CLI on the first command.
#
# Everything a sandbox reaches goes out through its mind's egress, which signs with a CA that is
# known only when the container starts: the sandbox's entrypoint trusts it (system store and the
# Chromium NSS database) then, never this build.
FROM node:26.13.1-trixie-slim

ENV DEBIAN_FRONTEND=noninteractive CI=1

# A dev machine's system packages. `libnss3-tools` is Chromium's `certutil`; `ffmpeg` and Chromium
# are what agents use for media and screenshots.
RUN apt-get update -qq \
  && apt-get install -y -qq --no-install-recommends \
    build-essential ca-certificates chromium curl ffmpeg fonts-liberation fonts-noto-color-emoji \
    git gnupg jq less libnss3-tools openssh-client procps python3 ripgrep unzip vim-tiny xz-utils \
  && rm -rf /var/lib/apt/lists/*

# The GitHub CLI and the Doppler CLI, from their own apt repositories.
RUN install -d -m 755 /etc/apt/keyrings \
  && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
  && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
  && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list \
  # allow-high-entropy-next-line: the id of Doppler's public apt signing key, in the URL of that key
  && curl -fsSL https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key | gpg --dearmor -o /etc/apt/keyrings/doppler.gpg \
  && echo "deb [signed-by=/etc/apt/keyrings/doppler.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" > /etc/apt/sources.list.d/doppler-cli.list \
  && apt-get update -qq \
  && apt-get install -y -qq --no-install-recommends gh doppler \
  && rm -rf /var/lib/apt/lists/*

# Pinned, so an image is the same every time it is built; a version moves in a commit. pnpm 12
# fetches its native binary on its first run, so the build runs it once to keep that in the image.
# Node 25 and later ship no corepack, so npm installs it.
RUN npm install -g --no-fund --no-audit corepack@0.36.0 \
  && corepack enable && corepack prepare pnpm@12.18.0 --activate && pnpm --version
RUN npm install -g --no-fund --no-audit \
    @anthropic-ai/claude-code@2.1.292 \
    @openai/codex@0.160.1 \
    @xai-official/grok@1.0.46 \
    iterate@0.4.1-main.20261007T065323Z-9e9cca2 \
    cf@1.0.0-beta.12 \
    # The ACP adapters a sandbox's runner starts (internal-packages/acp-bridge/src/agents.ts
    # sandboxLaunches), at the versions pinned there: a session then downloads nothing.
    @agentclientprotocol/codex-acp@2.6.0 \
    @agentclientprotocol/claude-agent-acp@0.106.0 \
  && npm cache clean --force

# The public repository, for a sandbox that wants the platform's source at hand.
RUN git clone --depth 1 https://github.com/iterate/core /work/core

WORKDIR /work